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

Unified Diff: content/test/accessibility_browser_test_utils.cc

Issue 401643003: Correctly update the bounds of objects in the accessibility tree. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update win and android expectations Created 6 years, 5 months 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
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();

Powered by Google App Engine
This is Rietveld 408576698