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

Side by Side Diff: chrome/browser/cocoa/edit_search_engine_cocoa_controller_unittest.mm

Issue 2769014: Mac/clang: Possibly contentious changes. (Closed)
Patch Set: comments2 Created 10 years, 6 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
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 #include "app/l10n_util_mac.h" 5 #include "app/l10n_util_mac.h"
6 #include "base/scoped_nsobject.h" 6 #include "base/scoped_nsobject.h"
7 #include "chrome/browser/browser.h" 7 #include "chrome/browser/browser.h"
8 #include "chrome/browser/cocoa/browser_test_helper.h" 8 #include "chrome/browser/cocoa/browser_test_helper.h"
9 #include "chrome/browser/cocoa/cocoa_test_helper.h" 9 #include "chrome/browser/cocoa/cocoa_test_helper.h"
10 #import "chrome/browser/cocoa/edit_search_engine_cocoa_controller.h" 10 #import "chrome/browser/cocoa/edit_search_engine_cocoa_controller.h"
11 #include "chrome/test/testing_profile.h" 11 #include "chrome/test/testing_profile.h"
12 #include "grit/generated_resources.h" 12 #include "grit/generated_resources.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 #include "testing/platform_test.h" 14 #include "testing/platform_test.h"
15 15
16 @interface FakeEditSearchEngineController : EditSearchEngineCocoaController { 16 @interface FakeEditSearchEngineController : EditSearchEngineCocoaController {
17 } 17 }
18 @property (readonly) NSTextField* nameField; 18 @property (nonatomic, readonly) NSTextField* nameField;
19 @property (readonly) NSTextField* keywordField; 19 @property (nonatomic, readonly) NSTextField* keywordField;
20 @property (readonly) NSTextField* urlField; 20 @property (nonatomic, readonly) NSTextField* urlField;
21 @property (readonly) NSImageView* nameImage; 21 @property (nonatomic, readonly) NSImageView* nameImage;
22 @property (readonly) NSImageView* keywordImage; 22 @property (nonatomic, readonly) NSImageView* keywordImage;
23 @property (readonly) NSImageView* urlImage; 23 @property (nonatomic, readonly) NSImageView* urlImage;
24 @property (readonly) NSButton* doneButton; 24 @property (nonatomic, readonly) NSButton* doneButton;
25 @property (readonly) NSImage* goodImage; 25 @property (nonatomic, readonly) NSImage* goodImage;
26 @property (readonly) NSImage* badImage; 26 @property (nonatomic, readonly) NSImage* badImage;
27 @end 27 @end
28 28
29 @implementation FakeEditSearchEngineController 29 @implementation FakeEditSearchEngineController
30 @synthesize nameField = nameField_; 30 @synthesize nameField = nameField_;
31 @synthesize keywordField = keywordField_; 31 @synthesize keywordField = keywordField_;
32 @synthesize urlField = urlField_; 32 @synthesize urlField = urlField_;
33 @synthesize nameImage = nameImage_; 33 @synthesize nameImage = nameImage_;
34 @synthesize keywordImage = keywordImage_; 34 @synthesize keywordImage = keywordImage_;
35 @synthesize urlImage = urlImage_; 35 @synthesize urlImage = urlImage_;
36 @synthesize doneButton = doneButton_; 36 @synthesize doneButton = doneButton_;
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 EXPECT_TRUE([@"Foobar" isEqualToString:nameString]); 222 EXPECT_TRUE([@"Foobar" isEqualToString:nameString]);
223 NSString* keywordString = [[controller keywordField] stringValue]; 223 NSString* keywordString = [[controller keywordField] stringValue];
224 EXPECT_TRUE([@"keyword" isEqualToString:keywordString]); 224 EXPECT_TRUE([@"keyword" isEqualToString:keywordString]);
225 NSString* urlValueString = [[controller urlField] stringValue]; 225 NSString* urlValueString = [[controller urlField] stringValue];
226 EXPECT_TRUE([@"http://foo-bar.com" isEqualToString:urlValueString]); 226 EXPECT_TRUE([@"http://foo-bar.com" isEqualToString:urlValueString]);
227 EXPECT_TRUE([controller validateFields]); 227 EXPECT_TRUE([controller validateFields]);
228 [controller close]; 228 [controller close];
229 } 229 }
230 230
231 } // namespace 231 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698