summaryrefslogtreecommitdiffstats
path: root/views/controls/progress_bar_unittest.cc
diff options
context:
space:
mode:
authorctguil@chromium.org <ctguil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-31 22:06:27 +0000
committerctguil@chromium.org <ctguil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-31 22:06:27 +0000
commitf31b7a05f88fbddd14428827b351fe736133e26e (patch)
tree46e32d38fcfb7e7e122292d6124ae35b853bc160 /views/controls/progress_bar_unittest.cc
parent60d71f46387b6f9f42c627db4d5edb72f34ed8cc (diff)
downloadchromium_src-f31b7a05f88fbddd14428827b351fe736133e26e.zip
chromium_src-f31b7a05f88fbddd14428827b351fe736133e26e.tar.gz
chromium_src-f31b7a05f88fbddd14428827b351fe736133e26e.tar.bz2
views: Implement a TODO to test the Accessible Name feature for the ProgressBar control.
BUG=None TEST=out/Debug/unit_tests --gtest_filter=ProgressBarTest.* Patch from Thiago Farina <thiago.farina@gmail.com> Review URL: http://codereview.chromium.org/1531001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43267 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/progress_bar_unittest.cc')
-rw-r--r--views/controls/progress_bar_unittest.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/views/controls/progress_bar_unittest.cc b/views/controls/progress_bar_unittest.cc
index 73524c7..2966d56 100644
--- a/views/controls/progress_bar_unittest.cc
+++ b/views/controls/progress_bar_unittest.cc
@@ -52,7 +52,14 @@ TEST(ProgressBarTest, Accessibility) {
EXPECT_TRUE(bar.GetAccessibleRole(&role));
EXPECT_EQ(AccessibilityTypes::ROLE_TEXT, role);
- // TODO(denisromanov): Test accessibility text here when it's implemented.
+ std::wstring name;
+ EXPECT_FALSE(bar.GetAccessibleName(&name));
+ EXPECT_EQ(std::wstring(), name);
+ std::wstring accessible_name = L"My progress bar";
+ bar.SetAccessibleName(accessible_name);
+ EXPECT_TRUE(bar.GetAccessibleName(&name));
+ EXPECT_EQ(accessible_name, name);
+
AccessibilityTypes::State state;
EXPECT_TRUE(bar.GetAccessibleState(&state));