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

Side by Side Diff: ui/gfx/render_text.h

Issue 276123003: Add a unit tests for RenderText::FindCursorPosition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refine the test; cleanup debugging code. Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/gfx/render_text_unittest.cc » ('j') | ui/gfx/render_text_unittest.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_RENDER_TEXT_H_ 5 #ifndef UI_GFX_RENDER_TEXT_H_
6 #define UI_GFX_RENDER_TEXT_H_ 6 #define UI_GFX_RENDER_TEXT_H_
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <cstring> 9 #include <cstring>
10 #include <string> 10 #include <string>
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, DefaultStyle); 554 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, DefaultStyle);
555 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, SetColorAndStyle); 555 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, SetColorAndStyle);
556 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ApplyColorAndStyle); 556 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ApplyColorAndStyle);
557 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ObscuredText); 557 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ObscuredText);
558 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, RevealObscuredText); 558 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, RevealObscuredText);
559 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ElidedText); 559 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ElidedText);
560 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ElidedObscuredText); 560 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, ElidedObscuredText);
561 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, TruncatedText); 561 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, TruncatedText);
562 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, TruncatedObscuredText); 562 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, TruncatedObscuredText);
563 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GraphemePositions); 563 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GraphemePositions);
564 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, FindCursorPosition);
564 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, EdgeSelectionModels); 565 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, EdgeSelectionModels);
565 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GetTextOffset); 566 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GetTextOffset);
566 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GetTextOffsetHorizontalDefaultInRTL); 567 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GetTextOffsetHorizontalDefaultInRTL);
567 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_MinWidth); 568 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_MinWidth);
568 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_NormalWidth); 569 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_NormalWidth);
569 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_SufficientWidth); 570 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_SufficientWidth);
570 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_Newline); 571 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_Newline);
571 572
572 // Set the cursor to |position|, with the caret trailing the previous 573 // Set the cursor to |position|, with the caret trailing the previous
573 // grapheme, or if there is no previous grapheme, leading the cursor position. 574 // grapheme, or if there is no previous grapheme, leading the cursor position.
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 // Lines computed by EnsureLayout. These should be invalidated with 704 // Lines computed by EnsureLayout. These should be invalidated with
704 // ResetLayout and on |display_rect_| changes. 705 // ResetLayout and on |display_rect_| changes.
705 std::vector<internal::Line> lines_; 706 std::vector<internal::Line> lines_;
706 707
707 DISALLOW_COPY_AND_ASSIGN(RenderText); 708 DISALLOW_COPY_AND_ASSIGN(RenderText);
708 }; 709 };
709 710
710 } // namespace gfx 711 } // namespace gfx
711 712
712 #endif // UI_GFX_RENDER_TEXT_H_ 713 #endif // UI_GFX_RENDER_TEXT_H_
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/render_text_unittest.cc » ('j') | ui/gfx/render_text_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698