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

Unified Diff: ui/base/cocoa/controls/hyperlink_text_view_unittest.mm

Issue 1364113003: Only (and always) put URLs in NSLinkAttributeName. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@infobar1
Patch Set: stray deletion Created 5 years, 3 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 | « ui/base/cocoa/controls/hyperlink_text_view.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1aca1a36812388fa8607cd9ac9c62a8696d75863..671be65386cf6e8fc07b9ac03b873f2f656f3384 100644
--- a/ui/base/cocoa/controls/hyperlink_text_view_unittest.mm
+++ b/ui/base/cocoa/controls/hyperlink_text_view_unittest.mm
@@ -90,8 +90,8 @@ TEST_F(HyperlinkTextViewTest, TestAddLinkRange) {
messageColor:[NSColor blackColor]];
NSColor* blue = [NSColor blueColor];
- [view_ addLinkRange:NSMakeRange(4,3) withName:@"Name:Two" linkColor:blue];
- [view_ addLinkRange:NSMakeRange(14,4) withName:@"Name:Four" linkColor:blue];
+ [view_ addLinkRange:NSMakeRange(4,3) withURL:@"http://2" linkColor:blue];
+ [view_ addLinkRange:NSMakeRange(14,4) withURL:@"http://4" linkColor:blue];
NSDictionary* attributes;
NSRange rangeLimit = NSMakeRange(0, [message length]);
@@ -104,7 +104,7 @@ TEST_F(HyperlinkTextViewTest, TestAddLinkRange) {
EXPECT_NSEQ(GetDefaultTextAttributes(), attributes);
NSMutableDictionary* linkAttributes = GetDefaultLinkAttributes();
- [linkAttributes setObject:@"Name:Two" forKey:NSLinkAttributeName];
+ [linkAttributes setObject:@"http://2" forKey:NSLinkAttributeName];
attributes = [[view_ textStorage] attributesAtIndex:4
longestEffectiveRange:&range
inRange:rangeLimit];
@@ -119,7 +119,7 @@ TEST_F(HyperlinkTextViewTest, TestAddLinkRange) {
EXPECT_EQ(7U, range.length);
EXPECT_NSEQ(GetDefaultTextAttributes(), attributes);
- [linkAttributes setObject:@"Name:Four" forKey:NSLinkAttributeName];
+ [linkAttributes setObject:@"http://4" forKey:NSLinkAttributeName];
attributes = [[view_ textStorage] attributesAtIndex:14
longestEffectiveRange:&range
inRange:rangeLimit];
« no previous file with comments | « ui/base/cocoa/controls/hyperlink_text_view.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698