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

Side by Side Diff: ui/views/controls/progress_bar_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
« no previous file with comments | « ui/views/controls/progress_bar.cc ('k') | ui/views/controls/resize_area.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ui/views/controls/progress_bar.h" 5 #include "ui/views/controls/progress_bar.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "ui/accessibility/ax_view_state.h" 9 #include "ui/accessibility/ax_node_data.h"
10 10
11 namespace views { 11 namespace views {
12 12
13 TEST(ProgressBarTest, Accessibility) { 13 TEST(ProgressBarTest, Accessibility) {
14 ProgressBar bar; 14 ProgressBar bar;
15 bar.SetValue(0.62); 15 bar.SetValue(0.62);
16 16
17 ui::AXViewState state; 17 ui::AXNodeData node_data;
18 bar.GetAccessibleState(&state); 18 bar.GetAccessibleNodeData(&node_data);
19 EXPECT_EQ(ui::AX_ROLE_PROGRESS_INDICATOR, state.role); 19 EXPECT_EQ(ui::AX_ROLE_PROGRESS_INDICATOR, node_data.role);
20 EXPECT_EQ(base::string16(), state.name); 20 EXPECT_EQ(base::string16(), node_data.GetString16Attribute(ui::AX_ATTR_NAME));
21 EXPECT_TRUE(state.HasStateFlag(ui::AX_STATE_READ_ONLY)); 21 EXPECT_TRUE(node_data.HasStateFlag(ui::AX_STATE_READ_ONLY));
22 } 22 }
23 23
24 } // namespace views 24 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/progress_bar.cc ('k') | ui/views/controls/resize_area.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698