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

Unified Diff: chrome/browser/cocoa/autocomplete_text_field_unittest_helper.mm

Issue 402066: Moved a whole pile of unittests over to CocoaTest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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
Index: chrome/browser/cocoa/autocomplete_text_field_unittest_helper.mm
===================================================================
--- chrome/browser/cocoa/autocomplete_text_field_unittest_helper.mm (revision 32421)
+++ chrome/browser/cocoa/autocomplete_text_field_unittest_helper.mm (working copy)
@@ -11,17 +11,19 @@
@implementation AutocompleteTextFieldWindowTestDelegate
- (id)windowWillReturnFieldEditor:(NSWindow *)sender toObject:(id)anObject {
- EXPECT_TRUE([anObject isKindOfClass:[AutocompleteTextField class]]);
+ id editor = nil;
+ if ([anObject isKindOfClass:[AutocompleteTextField class]]) {
+ if (editor_ == nil) {
+ editor_.reset([[AutocompleteTextFieldEditor alloc] init]);
+ }
+ EXPECT_TRUE(editor_ != nil);
- if (editor_ == nil) {
- editor_.reset([[AutocompleteTextFieldEditor alloc] init]);
+ // This needs to be called every time, otherwise notifications
+ // aren't sent correctly.
+ [editor_ setFieldEditor:YES];
+ editor = editor_.get();
}
- EXPECT_TRUE(editor_ != nil);
-
- // This needs to be called every time, otherwise notifications
- // aren't sent correctly.
- [editor_ setFieldEditor:YES];
- return editor_;
+ return editor;
}
@end
Property changes on: chrome/browser/cocoa/autocomplete_text_field_unittest_helper.mm
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/browser/cocoa/autocomplete_text_field_unittest.mm ('k') | chrome/browser/cocoa/background_gradient_view_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698