| Index: content/test/accessibility_browser_test_utils.cc
|
| diff --git a/content/test/accessibility_browser_test_utils.cc b/content/test/accessibility_browser_test_utils.cc
|
| index e91b2cf23987049983a4b10c74d2ac47ef17e215..ae514aec4af7ebb37fc4bfd07c70ce2763a0ea7a 100644
|
| --- a/content/test/accessibility_browser_test_utils.cc
|
| +++ b/content/test/accessibility_browser_test_utils.cc
|
| @@ -58,6 +58,10 @@ AccessibilityNotificationWaiter::~AccessibilityNotificationWaiter() {
|
|
|
| void AccessibilityNotificationWaiter::WaitForNotification() {
|
| loop_runner_->Run();
|
| +
|
| + // Each loop runner can only be called once. Create a new one in case
|
| + // the caller wants to call this again to wait for the next notification.
|
| + loop_runner_ = new MessageLoopRunner();
|
| }
|
|
|
| const ui::AXTree& AccessibilityNotificationWaiter::GetAXTree() const {
|
| @@ -66,7 +70,7 @@ const ui::AXTree& AccessibilityNotificationWaiter::GetAXTree() const {
|
|
|
| void AccessibilityNotificationWaiter::OnAccessibilityEvent(
|
| ui::AXEvent event_type, int event_target_id) {
|
| - if (!IsAboutBlank() && (event_to_wait_for_ == ui::AX_EVENT_NONE ||
|
| + if (!IsAboutBlank() && (event_to_wait_for_ == ui::AX_EVENT_NONE ||
|
| event_to_wait_for_ == event_type)) {
|
| event_target_id_ = event_target_id;
|
| loop_runner_->Quit();
|
|
|