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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #import "chrome/browser/cocoa/autocomplete_text_field_unittest_helper.h" 5 #import "chrome/browser/cocoa/autocomplete_text_field_unittest_helper.h"
6 6
7 #import "chrome/browser/cocoa/autocomplete_text_field.h" 7 #import "chrome/browser/cocoa/autocomplete_text_field.h"
8 #import "chrome/browser/cocoa/autocomplete_text_field_editor.h" 8 #import "chrome/browser/cocoa/autocomplete_text_field_editor.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 @implementation AutocompleteTextFieldWindowTestDelegate 11 @implementation AutocompleteTextFieldWindowTestDelegate
12 12
13 - (id)windowWillReturnFieldEditor:(NSWindow *)sender toObject:(id)anObject { 13 - (id)windowWillReturnFieldEditor:(NSWindow *)sender toObject:(id)anObject {
14 EXPECT_TRUE([anObject isKindOfClass:[AutocompleteTextField class]]); 14 id editor = nil;
15 if ([anObject isKindOfClass:[AutocompleteTextField class]]) {
16 if (editor_ == nil) {
17 editor_.reset([[AutocompleteTextFieldEditor alloc] init]);
18 }
19 EXPECT_TRUE(editor_ != nil);
15 20
16 if (editor_ == nil) { 21 // This needs to be called every time, otherwise notifications
17 editor_.reset([[AutocompleteTextFieldEditor alloc] init]); 22 // aren't sent correctly.
23 [editor_ setFieldEditor:YES];
24 editor = editor_.get();
18 } 25 }
19 EXPECT_TRUE(editor_ != nil); 26 return editor;
20
21 // This needs to be called every time, otherwise notifications
22 // aren't sent correctly.
23 [editor_ setFieldEditor:YES];
24 return editor_;
25 } 27 }
26 28
27 @end 29 @end
OLDNEW
« 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