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

Unified Diff: mojo/services/html_viewer/ax_provider_impl.cc

Issue 1049013004: Add some simple HTMLViewer apptests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use net::SpawnedTestServer instead of mojo:http_server. Created 5 years, 9 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 | « mojo/services/html_viewer/DEPS ('k') | mojo/services/html_viewer/ax_provider_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/html_viewer/ax_provider_impl.cc
diff --git a/mojo/services/html_viewer/ax_provider_impl.cc b/mojo/services/html_viewer/ax_provider_impl.cc
index 11a1356b45f80a3edbb7e605812edf1df46ab373..609e01491547be35c314c3141d16757becf4b853 100644
--- a/mojo/services/html_viewer/ax_provider_impl.cc
+++ b/mojo/services/html_viewer/ax_provider_impl.cc
@@ -28,9 +28,14 @@ void AxProviderImpl::GetTree(
web_view_->settings()->setAccessibilityEnabled(true);
web_view_->settings()->setInlineTextBoxAccessibilityEnabled(true);
- Array<AxNodePtr> result;
- Populate(web_view_->accessibilityObject(), 0, 0, &result);
- callback.Run(result.Pass());
+ // TODO(msw): Is this a deep copy?
+ WebAXObject web_ax_object = web_view_->accessibilityObject();
+ DCHECK(!web_ax_object.isDetached());
+ if (web_ax_object.updateLayoutAndCheckValidity()) {
+ Array<AxNodePtr> result;
+ Populate(web_ax_object, 0, 0, &result);
+ callback.Run(result.Pass());
+ }
}
int AxProviderImpl::Populate(const WebAXObject& ax_object,
« no previous file with comments | « mojo/services/html_viewer/DEPS ('k') | mojo/services/html_viewer/ax_provider_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698