| 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
|
|
|
|
|