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

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

Issue 2477463003: Replace ui::AXViewState with AXNodeData and AXActionData (Closed)
Patch Set: Fix test Created 4 years, 1 month 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser_accessibility_win.h" 5 #include "content/browser/accessibility/browser_accessibility_win.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 name.Reset(); 232 name.Reset();
233 233
234 text_dispatch.Release(); 234 text_dispatch.Release();
235 text_accessible.Release(); 235 text_accessible.Release();
236 236
237 // Notify the BrowserAccessibilityManager that the text child has changed. 237 // Notify the BrowserAccessibilityManager that the text child has changed.
238 AXContentNodeData text2; 238 AXContentNodeData text2;
239 text2.id = 2; 239 text2.id = 2;
240 text2.role = ui::AX_ROLE_STATIC_TEXT; 240 text2.role = ui::AX_ROLE_STATIC_TEXT;
241 text2.SetName("new text"); 241 text2.SetName("new text");
242 text2.SetName("old text");
243 AXEventNotificationDetails param; 242 AXEventNotificationDetails param;
244 param.event_type = ui::AX_EVENT_CHILDREN_CHANGED; 243 param.event_type = ui::AX_EVENT_CHILDREN_CHANGED;
245 param.update.nodes.push_back(text2); 244 param.update.nodes.push_back(text2);
246 param.id = text2.id; 245 param.id = text2.id;
247 std::vector<AXEventNotificationDetails> events; 246 std::vector<AXEventNotificationDetails> events;
248 events.push_back(param); 247 events.push_back(param);
249 manager->OnAccessibilityEvents(events); 248 manager->OnAccessibilityEvents(events);
250 249
251 // Query for the text IAccessible and verify that it now returns "new text" 250 // Query for the text IAccessible and verify that it now returns "new text"
252 // as its value. 251 // as its value.
(...skipping 2209 matching lines...) Expand 10 before | Expand all | Expand 10 after
2462 std::vector<AXEventNotificationDetails> events = {event}; 2461 std::vector<AXEventNotificationDetails> events = {event};
2463 manager->OnAccessibilityEvents(events); 2462 manager->OnAccessibilityEvents(events);
2464 2463
2465 EXPECT_HRESULT_SUCCEEDED(ax_child1->get_nRelations(&n_relations)); 2464 EXPECT_HRESULT_SUCCEEDED(ax_child1->get_nRelations(&n_relations));
2466 EXPECT_EQ(2, n_relations); 2465 EXPECT_EQ(2, n_relations);
2467 EXPECT_HRESULT_SUCCEEDED(ax_child2->get_nRelations(&n_relations)); 2466 EXPECT_HRESULT_SUCCEEDED(ax_child2->get_nRelations(&n_relations));
2468 EXPECT_EQ(2, n_relations); 2467 EXPECT_EQ(2, n_relations);
2469 } 2468 }
2470 2469
2471 } // namespace content 2470 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698