OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
| 5 #include "base/macros.h" |
5 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
6 #include "content/browser/accessibility/browser_accessibility.h" | 7 #include "content/browser/accessibility/browser_accessibility.h" |
7 #include "content/browser/accessibility/browser_accessibility_manager.h" | 8 #include "content/browser/accessibility/browser_accessibility_manager.h" |
8 #include "content/browser/accessibility/one_shot_accessibility_tree_search.h" | 9 #include "content/browser/accessibility/one_shot_accessibility_tree_search.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
10 | 11 |
11 namespace content { | 12 namespace content { |
12 | 13 |
13 namespace { | 14 namespace { |
14 | 15 |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 search.AddPredicate([](BrowserAccessibility* start, | 216 search.AddPredicate([](BrowserAccessibility* start, |
216 BrowserAccessibility* current) { | 217 BrowserAccessibility* current) { |
217 return (current->GetId() % 2 == 1); | 218 return (current->GetId() % 2 == 1); |
218 }); | 219 }); |
219 ASSERT_EQ(2U, search.CountMatches()); | 220 ASSERT_EQ(2U, search.CountMatches()); |
220 EXPECT_EQ(3, search.GetMatchAtIndex(0)->GetId()); | 221 EXPECT_EQ(3, search.GetMatchAtIndex(0)->GetId()); |
221 EXPECT_EQ(5, search.GetMatchAtIndex(1)->GetId()); | 222 EXPECT_EQ(5, search.GetMatchAtIndex(1)->GetId()); |
222 } | 223 } |
223 | 224 |
224 } // namespace content | 225 } // namespace content |
OLD | NEW |