| Index: ui/aura/test/mus/test_window_tree.cc
|
| diff --git a/ui/aura/test/mus/test_window_tree.cc b/ui/aura/test/mus/test_window_tree.cc
|
| index 7f8dda76f47eccab093471017ca40d9e5ca4c382..0bc9346368a30a80a2d04392e5fa13ca7762331b 100644
|
| --- a/ui/aura/test/mus/test_window_tree.cc
|
| +++ b/ui/aura/test/mus/test_window_tree.cc
|
| @@ -13,7 +13,19 @@ TestWindowTree::TestWindowTree() {}
|
| TestWindowTree::~TestWindowTree() {}
|
|
|
| bool TestWindowTree::WasEventAcked(uint32_t event_id) const {
|
| - return acked_events_.count(event_id);
|
| + for (const AckedEvent& acked_event : acked_events_) {
|
| + if (acked_event.event_id == event_id)
|
| + return true;
|
| + }
|
| + return false;
|
| +}
|
| +
|
| +ui::mojom::EventResult TestWindowTree::GetEventResult(uint32_t event_id) const {
|
| + for (const AckedEvent& acked_event : acked_events_) {
|
| + if (acked_event.event_id == event_id)
|
| + return acked_event.result;
|
| + }
|
| + return ui::mojom::EventResult::UNHANDLED;
|
| }
|
|
|
| base::Optional<std::vector<uint8_t>> TestWindowTree::GetLastPropertyValue() {
|
| @@ -251,8 +263,8 @@ void TestWindowTree::SetImeVisibility(uint32_t window_id,
|
|
|
| void TestWindowTree::OnWindowInputEventAck(uint32_t event_id,
|
| ui::mojom::EventResult result) {
|
| - EXPECT_FALSE(acked_events_.count(event_id));
|
| - acked_events_.insert(event_id);
|
| + EXPECT_FALSE(WasEventAcked(event_id));
|
| + acked_events_.push_back({event_id, result});
|
| }
|
|
|
| void TestWindowTree::GetWindowManagerClient(
|
|
|