#ifndef CONTENT_PUBLIC_TEST_SERVICE_WORKER_TEST_HELPERS_H_
#define CONTENT_PUBLIC_TEST_SERVICE_WORKER_TEST_HELPERS_H_
#include <cstdint>
#include <memory>
#include <vector>
#include "base/functional/callback_forward.h"
#include "base/test/simple_test_tick_clock.h"
#include "third_party/blink/public/mojom/service_worker/service_worker_database.mojom-forward.h"
class GURL;
namespace blink {
enum class EmbeddedWorkerStatus;
struct PlatformNotificationData;
}
namespace content {
class ServiceWorkerContext;
class ServiceWorkerVersion;
class ServiceWorkerTestHelper { … };
void StopServiceWorkerForScope(ServiceWorkerContext* context,
const GURL& scope,
base::OnceClosure complete_callback_ui);
void DispatchServiceWorkerNotificationClick(
ServiceWorkerContext* context,
const GURL& scope,
const blink::PlatformNotificationData& notification_data);
void AdvanceClockAfterRequestTimeout(ServiceWorkerContext* context,
int64_t service_worker_version_id,
base::SimpleTestTickClock* tick_clock);
void ResetTickClockToDefaultForAllLiveServiceWorkerVersions(
ServiceWorkerContext* context);
bool TriggerTimeoutAndCheckRunningState(ServiceWorkerContext* context,
int64_t service_worker_version_id);
bool CheckServiceWorkerIsRunning(ServiceWorkerContext* context,
int64_t service_worker_version_id);
bool CheckServiceWorkerIsStarting(ServiceWorkerContext* context,
int64_t service_worker_version_id);
bool CheckServiceWorkerIsStopping(ServiceWorkerContext* context,
int64_t service_worker_version_id);
bool CheckServiceWorkerIsStopped(ServiceWorkerContext* context,
int64_t service_worker_version_id);
void SetServiceWorkerIdleDelay(ServiceWorkerContext* context,
int64_t service_worker_version_id,
base::TimeDelta delay);
}
#endif