#include "content/browser/background_fetch/background_fetch_registration_notifier.h"
#include <stdint.h>
#include <memory>
#include <vector>
#include "base/test/task_environment.h"
#include "base/test/test_simple_task_runner.h"
#include "content/browser/background_fetch/background_fetch_registration_service_impl.h"
#include "content/common/background_fetch/background_fetch_types.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/background_fetch/background_fetch.mojom.h"
namespace content {
namespace {
const char kDeveloperId[] = …;
const char kPrimaryUniqueId[] = …;
const char kSecondaryUniqueId[] = …;
const char kURL[] = …;
constexpr uint64_t kDownloadTotal = …;
constexpr uint64_t kDownloaded = …;
constexpr uint64_t kUploadTotal = …;
constexpr uint64_t kUploaded = …;
class TestRegistrationObserver
: public blink::mojom::BackgroundFetchRegistrationObserver { … };
class BackgroundFetchRegistrationNotifierTest : public ::testing::Test { … };
TEST_F(BackgroundFetchRegistrationNotifierTest, NotifySingleObserver) { … }
TEST_F(BackgroundFetchRegistrationNotifierTest, NotifyMultipleObservers) { … }
TEST_F(BackgroundFetchRegistrationNotifierTest,
NotifyFollowingObserverInitiatedRemoval) { … }
TEST_F(BackgroundFetchRegistrationNotifierTest, NotifyWithoutObservers) { … }
TEST_F(BackgroundFetchRegistrationNotifierTest, NotifyRecordsUnavailable) { … }
TEST_F(BackgroundFetchRegistrationNotifierTest, NotifyRequestCompleted) { … }
}
}