summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/cocoa/autocomplete_text_field_editor_unittest.mm2
-rw-r--r--chrome/browser/cocoa/autocomplete_text_field_unittest_helper.h4
2 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/cocoa/autocomplete_text_field_editor_unittest.mm b/chrome/browser/cocoa/autocomplete_text_field_editor_unittest.mm
index e45fdd2..3df553d 100644
--- a/chrome/browser/cocoa/autocomplete_text_field_editor_unittest.mm
+++ b/chrome/browser/cocoa/autocomplete_text_field_editor_unittest.mm
@@ -52,7 +52,7 @@ class AutocompleteTextFieldEditorTest : public PlatformTest {
// Arrange for |field_| to get the right field editor.
window_delegate_.reset(
[[AutocompleteTextFieldWindowTestDelegate alloc] init]);
- [cocoa_helper_.window() setDelegate:window_delegate_];
+ [cocoa_helper_.window() setDelegate:window_delegate_.get()];
// Get the field editor setup.
cocoa_helper_.makeFirstResponder(field_);
diff --git a/chrome/browser/cocoa/autocomplete_text_field_unittest_helper.h b/chrome/browser/cocoa/autocomplete_text_field_unittest_helper.h
index 0993510..9aef620 100644
--- a/chrome/browser/cocoa/autocomplete_text_field_unittest_helper.h
+++ b/chrome/browser/cocoa/autocomplete_text_field_unittest_helper.h
@@ -7,6 +7,7 @@
#import <Cocoa/Cocoa.h>
+#import "base/cocoa_protocols_mac.h"
#include "base/scoped_nsobject.h"
#import "chrome/browser/cocoa/autocomplete_text_field.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -15,7 +16,8 @@
// Return the right field editor for AutocompleteTextField instance.
-@interface AutocompleteTextFieldWindowTestDelegate : NSObject {
+@interface AutocompleteTextFieldWindowTestDelegate :
+ NSObject<NSWindowDelegate> {
scoped_nsobject<AutocompleteTextFieldEditor> editor_;
}
- (id)windowWillReturnFieldEditor:(NSWindow *)sender toObject:(id)anObject;