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

Unified Diff: content/browser/accessibility/one_shot_accessibility_tree_search_unittest.cc

Issue 2427813002: Android accessibility should not treat whitespace-only nodes as interesting. (Closed)
Patch Set: Created 4 years, 2 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/browser/accessibility/one_shot_accessibility_tree_search.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/accessibility/one_shot_accessibility_tree_search_unittest.cc
diff --git a/content/browser/accessibility/one_shot_accessibility_tree_search_unittest.cc b/content/browser/accessibility/one_shot_accessibility_tree_search_unittest.cc
index 21dc1c5f687afa43b85f9eba2bb34d320b551bb9..9b34ad36ce8c680529a93d5da38d38c8e77b045c 100644
--- a/content/browser/accessibility/one_shot_accessibility_tree_search_unittest.cc
+++ b/content/browser/accessibility/one_shot_accessibility_tree_search_unittest.cc
@@ -96,6 +96,15 @@ TEST_F(MAYBE_OneShotAccessibilityTreeSearchTest, GetAll) {
ASSERT_EQ(6U, search.CountMatches());
}
+TEST_F(MAYBE_OneShotAccessibilityTreeSearchTest, NoCycle) {
+ // If you set a result limit of 1, you won't get the root node back as
+ // the first match.
+ OneShotAccessibilityTreeSearch search(tree_->GetRoot());
+ search.SetResultLimit(1);
+ ASSERT_EQ(1U, search.CountMatches());
+ EXPECT_NE(1, search.GetMatchAtIndex(0)->GetId());
+}
+
TEST_F(MAYBE_OneShotAccessibilityTreeSearchTest, ForwardsWithStartNode) {
OneShotAccessibilityTreeSearch search(tree_->GetRoot());
search.SetStartNode(tree_->GetFromID(4));
« no previous file with comments | « content/browser/accessibility/one_shot_accessibility_tree_search.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698