Index: services/ui/ws/window_tree_unittest.cc |
diff --git a/services/ui/ws/window_tree_unittest.cc b/services/ui/ws/window_tree_unittest.cc |
index 028ba9be9d9eb4bfe3d177b3e41b994031771546..cb0719f6a8e5f39070ea92489e09d54259066cee 100644 |
--- a/services/ui/ws/window_tree_unittest.cc |
+++ b/services/ui/ws/window_tree_unittest.cc |
@@ -325,7 +325,7 @@ TEST_F(WindowTreeTest, SetEventObserver) { |
ASSERT_EQ(0u, client->tracker()->changes()->size()); |
// Create an observer for pointer-down events. |
- WindowTreeTestApi(tree).SetEventObserver( |
+ WindowTreeTestApi(tree).AddEventObserver( |
CreateEventMatcher(ui::mojom::EventType::POINTER_DOWN), 111u); |
// Pointer-down events are sent to the client. |
@@ -336,7 +336,7 @@ TEST_F(WindowTreeTest, SetEventObserver) { |
client->tracker()->changes()->clear(); |
// Clearing the observer stops sending events to the client. |
- WindowTreeTestApi(tree).SetEventObserver(nullptr, 0u); |
+ WindowTreeTestApi(tree).RemoveEventObserver(111u); |
DispatchEventAndAckImmediately(pointer_down); |
ASSERT_EQ(0u, client->tracker()->changes()->size()); |
} |
@@ -351,7 +351,7 @@ TEST_F(WindowTreeTest, SetEventObserverNonMatching) { |
EXPECT_NO_FATAL_FAILURE(SetupEventTargeting(&client, &tree, &window)); |
// Create an observer for pointer-down events. |
- WindowTreeTestApi(tree).SetEventObserver( |
+ WindowTreeTestApi(tree).AddEventObserver( |
CreateEventMatcher(ui::mojom::EventType::POINTER_DOWN), 111u); |
// Pointer-up events are not sent to the client, since they don't match. |
@@ -370,7 +370,7 @@ TEST_F(WindowTreeTest, SetEventObserverSendsOnce) { |
// Create an observer for pointer-up events (which do not cause focus |
// changes). |
- WindowTreeTestApi(tree).SetEventObserver( |
+ WindowTreeTestApi(tree).AddEventObserver( |
CreateEventMatcher(ui::mojom::EventType::POINTER_UP), 111u); |
// Create an event inside the bounds of the client. |
@@ -393,10 +393,10 @@ TEST_F(WindowTreeTest, SetEventObserverWrongUser) { |
other_binding->client()->tracker()->changes()->clear(); |
// Set event observers on both the wm tree and the other user's tree. |
- WindowTreeTestApi(wm_tree()).SetEventObserver( |
+ WindowTreeTestApi(wm_tree()).AddEventObserver( |
CreateEventMatcher(ui::mojom::EventType::POINTER_UP), 111u); |
WindowTreeTestApi(other_tree) |
- .SetEventObserver(CreateEventMatcher(ui::mojom::EventType::POINTER_UP), |
+ .AddEventObserver(CreateEventMatcher(ui::mojom::EventType::POINTER_UP), |
222u); |
// An event is observed by the wm tree, but not by the other user's tree. |
@@ -409,13 +409,13 @@ TEST_F(WindowTreeTest, SetEventObserverWrongUser) { |
// Tests that an event observer cannot observe keystrokes. |
TEST_F(WindowTreeTest, SetEventObserverKeyEventsDisallowed) { |
- WindowTreeTestApi(wm_tree()).SetEventObserver( |
+ WindowTreeTestApi(wm_tree()).AddEventObserver( |
CreateEventMatcher(ui::mojom::EventType::KEY_PRESSED), 111u); |
ui::KeyEvent key_pressed(ui::ET_KEY_PRESSED, ui::VKEY_A, ui::EF_NONE); |
DispatchEventAndAckImmediately(key_pressed); |
EXPECT_EQ(0u, wm_client()->tracker()->changes()->size()); |
- WindowTreeTestApi(wm_tree()).SetEventObserver( |
+ WindowTreeTestApi(wm_tree()).AddEventObserver( |
CreateEventMatcher(ui::mojom::EventType::KEY_RELEASED), 222u); |
ui::KeyEvent key_released(ui::ET_KEY_RELEASED, ui::VKEY_A, ui::EF_NONE); |
DispatchEventAndAckImmediately(key_released); |