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

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

Issue 2806773002: Switched to using |AXPosition| for calculating word and line boundaries on Windows. (Closed)
Patch Set: Fixed line boundaries. Created 3 years, 8 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 eb5eba36fd5869d41abe5e5a9b48c5711eeee57e..5e40c0ab4f802f379f6095f936e34b2eb0e89184 100644
--- a/content/browser/accessibility/accessibility_win_browsertest.cc
+++ b/content/browser/accessibility/accessibility_win_browsertest.cc
@@ -1664,7 +1664,8 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
words.push_back(L"is \"");
words.push_back(L"the ");
words.push_back(L"study ");
- words.push_back(L"of " + embedded_character + L' ');
+ words.push_back(L"of ");
+ words.push_back(embedded_character);
words.push_back(L"of ");
words.push_back(L"conflict ");
words.push_back(L"and\n");
@@ -1682,6 +1683,12 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
CheckTextAtOffset(paragraph_text, word_start_offset, IA2_TEXT_BOUNDARY_WORD,
word_start_offset, word_end_offset, word);
word_start_offset = word_end_offset;
+ // If the word boundary is inside an embedded object, |word_end_offset|
+ // should be one past the embedded object character. To get to the start of
+ // the next word, we have to skip the space between the embedded object
+ // character and the next word.
+ if (word == embedded_character)
+ ++word_start_offset;
}
}

Powered by Google App Engine
This is Rietveld 408576698