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

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

Issue 2410333005: Create AXAction and AXActionData as a way to simplify accessibility actions (Closed)
Patch Set: Fix Android compile 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 waiter->WaitForNotification(); 102 waiter->WaitForNotification();
103 103
104 // More than one accessibility event could have been generated. 104 // More than one accessibility event could have been generated.
105 // To make sure we've received all accessibility events, add a 105 // To make sure we've received all accessibility events, add a
106 // sentinel by calling AccessibilityHitTest and waiting for a HOVER 106 // sentinel by calling AccessibilityHitTest and waiting for a HOVER
107 // event in response. 107 // event in response.
108 waiter.reset(new AccessibilityNotificationWaiter( 108 waiter.reset(new AccessibilityNotificationWaiter(
109 shell()->web_contents(), AccessibilityModeComplete, ui::AX_EVENT_HOVER)); 109 shell()->web_contents(), AccessibilityModeComplete, ui::AX_EVENT_HOVER));
110 BrowserAccessibilityManager* manager = 110 BrowserAccessibilityManager* manager =
111 web_contents->GetRootBrowserAccessibilityManager(); 111 web_contents->GetRootBrowserAccessibilityManager();
112 manager->delegate()->AccessibilityHitTest(gfx::Point(0, 0)); 112 manager->HitTest(gfx::Point(0, 0));
113 waiter->WaitForNotification(); 113 waiter->WaitForNotification();
114 114
115 // Save a copy of the final accessibility tree (as a text dump); we'll 115 // Save a copy of the final accessibility tree (as a text dump); we'll
116 // log this for the user later if the test fails. 116 // log this for the user later if the test fails.
117 final_tree_ = DumpUnfilteredAccessibilityTreeAsString(); 117 final_tree_ = DumpUnfilteredAccessibilityTreeAsString();
118 118
119 // Dump the event logs, running them through any filters specified 119 // Dump the event logs, running them through any filters specified
120 // in the HTML file. 120 // in the HTML file.
121 std::vector<std::string> event_logs = event_recorder->event_logs(); 121 std::vector<std::string> event_logs = event_recorder->event_logs();
122 std::vector<std::string> result; 122 std::vector<std::string> result;
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 } 328 }
329 329
330 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest, 330 IN_PROC_BROWSER_TEST_F(DumpAccessibilityEventsTest,
331 AccessibilityEventsTextChanged) { 331 AccessibilityEventsTextChanged) {
332 RunEventTest(FILE_PATH_LITERAL("text-changed.html")); 332 RunEventTest(FILE_PATH_LITERAL("text-changed.html"));
333 } 333 }
334 334
335 #endif // defined(OS_WIN) || defined(OS_MACOSX) 335 #endif // defined(OS_WIN) || defined(OS_MACOSX)
336 336
337 } // namespace content 337 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698