Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Unified Diff: ui/aura/test/mus/test_window_tree.cc

Issue 2533213006: Fixes coordinates supplied to WindowTreeHost (Closed)
Patch Set: comment Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« ui/aura/mus/window_tree_client.cc ('K') | « ui/aura/test/mus/test_window_tree.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« ui/aura/mus/window_tree_client.cc ('K') | « ui/aura/test/mus/test_window_tree.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698