#include "content/browser/browsing_data/browsing_data_browsertest_utils.h"
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "base/command_line.h"
#include "base/containers/heap_array.h"
#include "base/containers/span.h"
#include "base/functional/bind.h"
#include "base/run_loop.h"
#include "components/network_session_configurator/common/network_switches.h"
#include "content/browser/browsing_data/browsing_data_test_utils.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/network_service_instance.h"
#include "content/public/browser/network_service_util.h"
#include "content/public/browser/service_worker_context.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/storage_usage_info.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/content_browser_test_utils.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "net/base/url_util.h"
#include "net/test/embedded_test_server/http_response.h"
#include "services/network/public/mojom/network_service.mojom.h"
#include "services/network/public/mojom/network_service_test.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/storage_key/storage_key.h"
#include "third_party/blink/public/mojom/service_worker/service_worker_registration_options.mojom.h"
#include "url/origin.h"
namespace content {
namespace browsing_data_browsertest_utils {
namespace {
void AddServiceWorkerCallback(blink::ServiceWorkerStatusCode status) { … }
void GetServiceWorkersCallback(
base::OnceClosure callback,
std::vector<StorageUsageInfo>* out_service_workers,
const std::vector<StorageUsageInfo>& service_workers) { … }
}
void ServiceWorkerActivationObserver::SignalActivation(
ServiceWorkerContextWrapper* context,
base::OnceClosure callback) { … }
ServiceWorkerActivationObserver::ServiceWorkerActivationObserver(
ServiceWorkerContextWrapper* context,
base::OnceClosure callback)
: … { … }
ServiceWorkerActivationObserver::~ServiceWorkerActivationObserver() { … }
void ServiceWorkerActivationObserver::OnVersionStateChanged(
int64_t version_id,
const GURL& scope,
const blink::StorageKey& key,
ServiceWorkerVersion::Status) { … }
void SetIgnoreCertificateErrors(base::CommandLine* command_line) { … }
GURL AddServiceWorker(const std::string& origin,
StoragePartition* storage_partition,
net::EmbeddedTestServer* https_server) { … }
std::vector<StorageUsageInfo> GetServiceWorkers(
StoragePartition* storage_partition) { … }
void SetResponseContent(const GURL& url,
std::string* value,
net::test_server::BasicHttpResponse* response) { … }
void SetUpMockCertVerifier(int32_t default_result) { … }
}
}