chromium/content/browser/service_worker/service_worker_installed_scripts_sender_unittest.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "content/browser/service_worker/service_worker_installed_scripts_sender.h"

#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/run_loop.h"
#include "base/test/metrics/histogram_tester.h"
#include "content/browser/service_worker/embedded_worker_test_helper.h"
#include "content/browser/service_worker/service_worker_context_core.h"
#include "content/browser/service_worker/service_worker_test_utils.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/test/browser_task_environment.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "net/base/io_buffer.h"
#include "net/base/test_completion_callback.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/blob/blob_utils.h"
#include "third_party/blink/public/common/storage_key/storage_key.h"
#include "third_party/blink/public/mojom/service_worker/service_worker_registration.mojom.h"
#include "third_party/blink/public/mojom/service_worker/service_worker_registration_options.mojom.h"
#include "url/origin.h"

namespace content {

class ExpectedScriptInfo {};

class MockServiceWorkerInstalledScriptsManager
    : public blink::mojom::ServiceWorkerInstalledScriptsManager {};

class ServiceWorkerInstalledScriptsSenderTest : public testing::Test {};

FinishedReason;

TEST_F(ServiceWorkerInstalledScriptsSenderTest, SendScripts) {}

TEST_F(ServiceWorkerInstalledScriptsSenderTest, FailedToSendBody) {}

TEST_F(ServiceWorkerInstalledScriptsSenderTest, FailedToSendMetaData) {}

TEST_F(ServiceWorkerInstalledScriptsSenderTest, Histograms) {}

TEST_F(ServiceWorkerInstalledScriptsSenderTest, RequestScriptBeforeStreaming) {}

TEST_F(ServiceWorkerInstalledScriptsSenderTest, RequestScriptAfterStreaming) {}

// Test that the scripts sender aborts gracefully on ServiceWorkerContext
// shutdown.
TEST_F(ServiceWorkerInstalledScriptsSenderTest, NoContext) {}

// Test that the scripts sender aborts gracefully when a remote connection to
// the Storage Service is disconnected.
TEST_F(ServiceWorkerInstalledScriptsSenderTest, RemoteStorageDisconnection) {}

// Test that the scripts sender aborts gracefully when the storage is disabled.
TEST_F(ServiceWorkerInstalledScriptsSenderTest, StorageDisabled) {}

}  // namespace content