#include "content/browser/notifications/notification_event_dispatcher_impl.h"
#include <stdint.h>
#include <memory>
#include <utility>
#include <vector>
#include "base/functional/callback_helpers.h"
#include "base/test/task_environment.h"
#include "base/test/test_simple_task_runner.h"
#include "content/browser/renderer_host/render_frame_host_impl.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/test/test_renderer_host.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/notifications/notification_service.mojom.h"
namespace content {
namespace {
const char kPrimaryUniqueId[] = …;
const char kSomeOtherUniqueId[] = …;
class TestNotificationListener
: public blink::mojom::NonPersistentNotificationListener { … };
}
class NotificationEventDispatcherImplTest : public RenderViewHostTestHarness { … };
TEST_F(NotificationEventDispatcherImplTest,
DispatchNonPersistentShowEvent_NotifiesCorrectRegisteredListener) { … }
TEST_F(NotificationEventDispatcherImplTest,
DispatchNonPersistentEvent_RegisterListenerWithDifferentCreatorTypes) { … }
TEST_F(NotificationEventDispatcherImplTest,
DispatchNonPersistentEvent_DocumentInBFCache) { … }
TEST_F(NotificationEventDispatcherImplTest,
RegisterNonPersistentListener_FirstListenerGetsOnClose) { … }
TEST_F(NotificationEventDispatcherImplTest,
RegisterNonPersistentListener_SecondListenerGetsOnShow) { … }
TEST_F(NotificationEventDispatcherImplTest,
RegisterNonPersistentListener_ReplacedListenerGetsOnClick) { … }
TEST_F(NotificationEventDispatcherImplTest,
DispatchNonPersistentClickEvent_NotifiesCorrectRegisteredListener) { … }
TEST_F(NotificationEventDispatcherImplTest,
DispatchNonPersistentCloseEvent_NotifiesCorrectRegisteredListener) { … }
TEST_F(NotificationEventDispatcherImplTest,
DispatchMultipleNonPersistentEvents_StopsNotifyingAfterClose) { … }
}