chromium/ui/views/event_monitor_unittest.cc

// Copyright 2014 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/views/event_monitor.h"

#include <utility>

#include "base/memory/raw_ptr.h"
#include "ui/events/event_observer.h"
#include "ui/events/test/event_generator.h"
#include "ui/views/test/widget_test.h"
#include "ui/views/widget/widget_utils.h"

#if defined(USE_AURA)
#include "ui/aura/window.h"
#endif

namespace views::test {

// A simple event observer that records the number of events.
class TestEventObserver : public ui::EventObserver {};

class EventMonitorTest : public WidgetTest {};

TEST_F(EventMonitorTest, ShouldReceiveAppEventsWhileInstalled) {}

TEST_F(EventMonitorTest, ShouldReceiveWindowEventsWhileInstalled) {}

TEST_F(EventMonitorTest, ShouldNotReceiveEventsFromOtherWindow) {}

TEST_F(EventMonitorTest, ShouldOnlyReceiveRequestedEventTypes) {}

TEST_F(EventMonitorTest, WindowMonitorTornDownOnWindowClose) {}

namespace {
class DeleteOtherOnEventObserver : public ui::EventObserver {};
}  // namespace

// Ensure correct behavior when an event monitor is removed while iterating
// over the OS-controlled observer list.
TEST_F(EventMonitorTest, TwoMonitors) {}

}  // namespace views::test