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

Side by Side Diff: content/browser/accessibility/one_shot_accessibility_tree_search_unittest.cc

Issue 2000403003: [forbots] IWYU for ax_enums.h Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
OLDNEW
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 "content/browser/accessibility/one_shot_accessibility_tree_search.h" 5 #include "content/browser/accessibility/one_shot_accessibility_tree_search.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "content/browser/accessibility/browser_accessibility.h" 10 #include "content/browser/accessibility/browser_accessibility.h"
11 #include "content/browser/accessibility/browser_accessibility_manager.h" 11 #include "content/browser/accessibility/browser_accessibility_manager.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 #include "ui/accessibility/ax_enums.h"
13 14
14 namespace content { 15 namespace content {
15 16
16 namespace { 17 namespace {
17 18
18 class TestBrowserAccessibilityManager : public BrowserAccessibilityManager { 19 class TestBrowserAccessibilityManager : public BrowserAccessibilityManager {
19 public: 20 public:
20 TestBrowserAccessibilityManager( 21 TestBrowserAccessibilityManager(
21 const ui::AXTreeUpdate& initial_tree) 22 const ui::AXTreeUpdate& initial_tree)
22 : BrowserAccessibilityManager(initial_tree, 23 : BrowserAccessibilityManager(initial_tree,
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 search.AddPredicate([](BrowserAccessibility* start, 219 search.AddPredicate([](BrowserAccessibility* start,
219 BrowserAccessibility* current) { 220 BrowserAccessibility* current) {
220 return (current->GetId() % 2 == 1); 221 return (current->GetId() % 2 == 1);
221 }); 222 });
222 ASSERT_EQ(2U, search.CountMatches()); 223 ASSERT_EQ(2U, search.CountMatches());
223 EXPECT_EQ(3, search.GetMatchAtIndex(0)->GetId()); 224 EXPECT_EQ(3, search.GetMatchAtIndex(0)->GetId());
224 EXPECT_EQ(5, search.GetMatchAtIndex(1)->GetId()); 225 EXPECT_EQ(5, search.GetMatchAtIndex(1)->GetId());
225 } 226 }
226 227
227 } // namespace content 228 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698