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

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 unit tests. 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
« no previous file with comments | « no previous file | content/browser/accessibility/ax_platform_position.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 680176b25cc4c2131e70fa4896ef91e9f947b7f5..8eab2fc4f3fa22200605cae136413440d315a3a3 100644
--- a/content/browser/accessibility/accessibility_win_browsertest.cc
+++ b/content/browser/accessibility/accessibility_win_browsertest.cc
@@ -1701,7 +1701,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");
@@ -1719,6 +1720,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;
}
}
« no previous file with comments | « no previous file | content/browser/accessibility/ax_platform_position.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698