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

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: Rebase 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
« no previous file with comments | « content/test/accessibility_browser_test_utils.h ('k') | content/test/data/accessibility/transition.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ba0331c485fc84a0e910821e39473ee3d2dd3237..deb3deb0daeb94de2f0c7f5328f1622f38b36596 100644
--- a/content/test/accessibility_browser_test_utils.cc
+++ b/content/test/accessibility_browser_test_utils.cc
@@ -56,6 +56,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 {
@@ -64,7 +68,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();
« no previous file with comments | « content/test/accessibility_browser_test_utils.h ('k') | content/test/data/accessibility/transition.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698