#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include <tuple>
#include <utility>
#include <vector>
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/events/event.h"
#include "ui/events/event_target_iterator.h"
#include "ui/events/event_targeter.h"
#include "ui/events/event_utils.h"
#include "ui/events/test/events_test_utils.h"
#include "ui/events/test/test_event_handler.h"
#include "ui/events/test/test_event_processor.h"
#include "ui/events/test/test_event_target.h"
#include "ui/events/test/test_event_targeter.h"
HandlerSequenceRecorder;
namespace ui {
namespace test {
class EventProcessorTest : public testing::Test { … };
TEST_F(EventProcessorTest, Basic) { … }
class ReDispatchEventHandler : public TestEventHandler { … };
TEST_F(EventProcessorTest, NestedEventProcessing) { … }
TEST_F(EventProcessorTest, OnEventProcessingFinished) { … }
TEST_F(EventProcessorTest, OnEventProcessingStarted) { … }
TEST_F(EventProcessorTest, DispatchToNextBestTarget) { … }
TEST_F(EventProcessorTest, HandlerSequence) { … }
namespace {
enum DestroyTarget { … };
class DestroyDuringDispatchEventProcessor : public TestEventProcessor { … };
class DestroyDuringDispatchEventTarget : public TestEventTarget { … };
EventDispatchDetails DestroyDuringDispatchEventProcessor::PostDispatchEvent(
EventTarget* target,
const Event& event) { … }
}
TEST(EventProcessorCrashTest, DestroyDuringDispatch) { … }
namespace {
class DestroyDuringFindTargetEventTargeter : public TestEventTargeter { … };
}
TEST(EventProcessorCrashTest, DestroyDuringFindTarget) { … }
}
}