From f31b7a05f88fbddd14428827b351fe736133e26e Mon Sep 17 00:00:00 2001 From: "ctguil@chromium.org" Date: Wed, 31 Mar 2010 22:06:27 +0000 Subject: 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 Review URL: http://codereview.chromium.org/1531001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43267 0039d316-1c4b-4281-b951-d872f2087c98 --- views/controls/progress_bar_unittest.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'views/controls/progress_bar_unittest.cc') 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)); -- cgit v1.1