OLD | NEW |
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_view_state.h" |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 } | 22 } |
23 | 23 |
24 TEST(ProgressBarTest, Accessibility) { | 24 TEST(ProgressBarTest, Accessibility) { |
25 ProgressBar bar; | 25 ProgressBar bar; |
26 bar.SetValue(62); | 26 bar.SetValue(62); |
27 | 27 |
28 ui::AXViewState state; | 28 ui::AXViewState state; |
29 bar.GetAccessibleState(&state); | 29 bar.GetAccessibleState(&state); |
30 EXPECT_EQ(ui::AX_ROLE_PROGRESS_INDICATOR, state.role); | 30 EXPECT_EQ(ui::AX_ROLE_PROGRESS_INDICATOR, state.role); |
31 EXPECT_EQ(base::string16(), state.name); | 31 EXPECT_EQ(base::string16(), state.name); |
32 EXPECT_TRUE(ui::AX_STATE_READ_ONLY & state.state); | 32 EXPECT_TRUE(state.HasStateFlag(ui::AX_STATE_READ_ONLY)); |
33 } | 33 } |
34 | 34 |
35 } // namespace views | 35 } // namespace views |
OLD | NEW |