summaryrefslogtreecommitdiffstats
path: root/content/test/accessibility_browser_test_utils.h
diff options
context:
space:
mode:
authordmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-22 15:42:19 +0000
committerdmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-22 15:42:19 +0000
commit3fa0901a0b505e9170c7fb3482e0c20453f639ec (patch)
tree552c9aed11ebcb9f615e181b9a773a80d3992ad2 /content/test/accessibility_browser_test_utils.h
parent180d4e93366adc1281242eaa2a84a83962ad4cd2 (diff)
downloadchromium_src-3fa0901a0b505e9170c7fb3482e0c20453f639ec.zip
chromium_src-3fa0901a0b505e9170c7fb3482e0c20453f639ec.tar.gz
chromium_src-3fa0901a0b505e9170c7fb3482e0c20453f639ec.tar.bz2
Implement Android accessible hit testing using an IPC to the renderer process.
Only Blink can accurately determine what node is under the user's finger. Implement this by sending a hit test request every time the user does touch exploration, and returning a hover event on the appropriate accessible node in response. The test is meant to be a good sanity test and a skeleton, it tests that the hit test request returns a hover event in response, and I intend to follow this up with more specific tests of behavior as we tweak the algorithm. BUG=357371 Review URL: https://codereview.chromium.org/290633002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272193 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/test/accessibility_browser_test_utils.h')
-rw-r--r--content/test/accessibility_browser_test_utils.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/content/test/accessibility_browser_test_utils.h b/content/test/accessibility_browser_test_utils.h
index 4cffa08..5111e3c 100644
--- a/content/test/accessibility_browser_test_utils.h
+++ b/content/test/accessibility_browser_test_utils.h
@@ -40,9 +40,13 @@ class AccessibilityNotificationWaiter {
// the tree of accessibility nodes received from the renderer process.
const ui::AXTree& GetAXTree() const;
+ // After WaitForNotification returns, use this to retrieve the id of the
+ // node that was the target of the event.
+ int event_target_id() { return event_target_id_; }
+
private:
// Callback from RenderViewHostImpl.
- void OnAccessibilityEvent(ui::AXEvent event);
+ void OnAccessibilityEvent(ui::AXEvent event, int event_target_id);
// Helper function to determine if the accessibility tree in
// GetAXTree() is about the page with the url "about:blank".
@@ -53,6 +57,7 @@ class AccessibilityNotificationWaiter {
ui::AXEvent event_to_wait_for_;
scoped_refptr<MessageLoopRunner> loop_runner_;
base::WeakPtrFactory<AccessibilityNotificationWaiter> weak_factory_;
+ int event_target_id_;
DISALLOW_COPY_AND_ASSIGN(AccessibilityNotificationWaiter);
};