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

Unified Diff: content/browser/accessibility/accessibility_win_browsertest.cc

Issue 12481022: On Win, the accessible value of a document should be its url. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/accessibility/accessibility_win_browsertest.cc
diff --git a/content/browser/accessibility/accessibility_win_browsertest.cc b/content/browser/accessibility/accessibility_win_browsertest.cc
index c369c65c492d75be8827ee9b129a16d4f48f19f8..1158d7a850297cac2dec61e496aec26c878de818 100644
--- a/content/browser/accessibility/accessibility_win_browsertest.cc
+++ b/content/browser/accessibility/accessibility_win_browsertest.cc
@@ -358,9 +358,21 @@ void AccessibleChecker::CheckIA2Role(IAccessible* accessible) {
}
void AccessibleChecker::CheckAccessibleValue(IAccessible* accessible) {
- CComBSTR value;
+ // Don't check the value if if's a DOCUMENT role, because the value
+ // is supposed to be the url (and we don't keep track of that in the
+ // test expectations).
+ VARIANT var_role = {0};
HRESULT hr =
- accessible->get_accValue(CreateI4Variant(CHILDID_SELF), &value);
+ accessible->get_accRole(CreateI4Variant(CHILDID_SELF), &var_role);
+ ASSERT_EQ(S_OK, hr);
+ if (V_VT(&var_role) == VT_I4 &&
+ V_I4(&var_role) == ROLE_SYSTEM_DOCUMENT) {
+ return;
+ }
+
+ // Get the value.
+ CComBSTR value;
+ hr = accessible->get_accValue(CreateI4Variant(CHILDID_SELF), &value);
EXPECT_EQ(S_OK, hr);
// Test that the correct string was returned.

Powered by Google App Engine
This is Rietveld 408576698