| Index: ui/base/cocoa/controls/hyperlink_text_view_unittest.mm
|
| diff --git a/ui/base/cocoa/controls/hyperlink_text_view_unittest.mm b/ui/base/cocoa/controls/hyperlink_text_view_unittest.mm
|
| index 28014246f754f6daca765eaf9682e55bf6012636..efbf68656239ae3e72664c61b8215a9c30317225 100644
|
| --- a/ui/base/cocoa/controls/hyperlink_text_view_unittest.mm
|
| +++ b/ui/base/cocoa/controls/hyperlink_text_view_unittest.mm
|
| @@ -58,6 +58,20 @@ class HyperlinkTextViewTest : public ui::CocoaTest {
|
|
|
| TEST_VIEW(HyperlinkTextViewTest, view_);
|
|
|
| +TEST_F(HyperlinkTextViewTest, TestSelectionRange) {
|
| + NSRange actualRange;
|
| +
|
| + // The length of the selection range should be 0.
|
| + actualRange = [view_ selectionRangeForProposedRange:NSMakeRange(0, 20)
|
| + granularity:NSSelectByCharacter];
|
| + EXPECT_TRUE(NSEqualRanges(NSMakeRange(0, 0), actualRange));
|
| +
|
| + // While the location should always match the location of the proposed range.
|
| + actualRange = [view_ selectionRangeForProposedRange:NSMakeRange(50, 100)
|
| + granularity:NSSelectByCharacter];
|
| + EXPECT_TRUE(NSEqualRanges(NSMakeRange(50, 0), actualRange));
|
| +}
|
| +
|
| TEST_F(HyperlinkTextViewTest, TestViewConfiguration) {
|
| EXPECT_FALSE([view_ isEditable]);
|
| EXPECT_FALSE([view_ drawsBackground]);
|
|
|