diff options
author | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-22 15:42:19 +0000 |
---|---|---|
committer | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-22 15:42:19 +0000 |
commit | 3fa0901a0b505e9170c7fb3482e0c20453f639ec (patch) | |
tree | 552c9aed11ebcb9f615e181b9a773a80d3992ad2 /content/test/accessibility_browser_test_utils.cc | |
parent | 180d4e93366adc1281242eaa2a84a83962ad4cd2 (diff) | |
download | chromium_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.cc')
-rw-r--r-- | content/test/accessibility_browser_test_utils.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/content/test/accessibility_browser_test_utils.cc b/content/test/accessibility_browser_test_utils.cc index e8ba40f..dc7a7f8 100644 --- a/content/test/accessibility_browser_test_utils.cc +++ b/content/test/accessibility_browser_test_utils.cc @@ -23,7 +23,8 @@ AccessibilityNotificationWaiter::AccessibilityNotificationWaiter(Shell* shell) : shell_(shell), event_to_wait_for_(ui::AX_EVENT_NONE), loop_runner_(new MessageLoopRunner()), - weak_factory_(this) { + weak_factory_(this), + event_target_id_(0) { WebContents* web_contents = shell_->web_contents(); view_host_ = static_cast<RenderViewHostImpl*>( web_contents->GetRenderViewHost()); @@ -39,7 +40,8 @@ AccessibilityNotificationWaiter::AccessibilityNotificationWaiter( : shell_(shell), event_to_wait_for_(event_type), loop_runner_(new MessageLoopRunner()), - weak_factory_(this) { + weak_factory_(this), + event_target_id_(0) { WebContents* web_contents = shell_->web_contents(); view_host_ = static_cast<RenderViewHostImpl*>( web_contents->GetRenderViewHost()); @@ -61,9 +63,10 @@ const ui::AXTree& AccessibilityNotificationWaiter::GetAXTree() const { } void AccessibilityNotificationWaiter::OnAccessibilityEvent( - ui::AXEvent event_type) { + ui::AXEvent event_type, int event_target_id) { 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(); } } |