chromium/ui/message_center/notification_blocker_unittest.cc

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

#include "ui/message_center/notification_blocker.h"

#include "testing/gtest/include/gtest/gtest.h"
#include "ui/message_center/fake_message_center.h"
#include "ui/message_center/lock_screen/fake_lock_screen_controller.h"
#include "ui/message_center/message_center.h"

namespace message_center {

namespace {

class TestNotificationBlocker : public NotificationBlocker {};

class TestMessageCenter : public FakeMessageCenter {};

}  // namespace

class NotificationBlockerTest : public testing::Test {};

// Tests that a `NotificationBlocker` is not registered with the `MessageCenter`
// upon construction, but is registered after `Init()` has been called.
TEST_F(NotificationBlockerTest, OnlyRegisteredAfterInit) {}

NotificationBlockerDeathTest;

// Tests that the program crashes if an attempt is made to initialize a
// `NotificationBlocker` more than once.
TEST_F(NotificationBlockerDeathTest, MaxOneInit) {}

}  // namespace message_center