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

Side by Side Diff: chrome/browser/ui/cocoa/hyperlink_text_view_unittest.mm

Issue 468913004: Fix naming to conform to Cocoa conventions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: One simple change that will restore your faith in humanity! Created 6 years, 4 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 | « chrome/browser/ui/cocoa/hyperlink_text_view.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "base/mac/scoped_nsobject.h" 5 #include "base/mac/scoped_nsobject.h"
6 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" 6 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
7 #import "chrome/browser/ui/cocoa/hyperlink_text_view.h" 7 #import "chrome/browser/ui/cocoa/hyperlink_text_view.h"
8 #include "testing/gtest_mac.h" 8 #include "testing/gtest_mac.h"
9 9
10 namespace { 10 namespace {
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 179
180 [linkAttributes setObject:@"Name:Four" forKey:NSLinkAttributeName]; 180 [linkAttributes setObject:@"Name:Four" forKey:NSLinkAttributeName];
181 attributes = [[view_ textStorage] attributesAtIndex:14 181 attributes = [[view_ textStorage] attributesAtIndex:14
182 longestEffectiveRange:&range 182 longestEffectiveRange:&range
183 inRange:rangeLimit]; 183 inRange:rangeLimit];
184 EXPECT_EQ(14U, range.location); 184 EXPECT_EQ(14U, range.location);
185 EXPECT_EQ(4U, range.length); 185 EXPECT_EQ(4U, range.length);
186 EXPECT_NSEQ(linkAttributes, attributes); 186 EXPECT_NSEQ(linkAttributes, attributes);
187 } 187 }
188 188
189 TEST_F(HyperlinkTextViewTest, FirstResponderBehavior) {
190 // By default, accept.
191 EXPECT_TRUE([view_ acceptsFirstResponder]);
192
193 [view_ setRefusesFirstResponder:YES];
194 EXPECT_FALSE([view_ acceptsFirstResponder]);
195 }
196
189 } // namespace 197 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/hyperlink_text_view.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698