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

Side by Side Diff: ios/chrome/browser/ui/settings/cells/byo_textfield_item_unittest.mm

Issue 2589583003: Upstream Chrome on iOS source code [7/11]. (Closed)
Patch Set: Created 4 years 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #import "ios/chrome/browser/ui/settings/cells/byo_textfield_item.h"
6
7 #include "testing/gtest/include/gtest/gtest.h"
8 #include "testing/gtest_mac.h"
9
10 #if !defined(__has_feature) || !__has_feature(objc_arc)
11 #error "This file requires ARC support."
12 #endif
13
14 namespace {
15
16 // Tests that the textfield is set properly after a call to |configureCell:|.
17 TEST(BYOTextFieldItemTest, ConfigureCell) {
18 BYOTextFieldItem* item = [[BYOTextFieldItem alloc] initWithType:0];
19 BYOTextFieldCell* cell = [[[item cellClass] alloc] init];
20 EXPECT_TRUE([cell isMemberOfClass:[BYOTextFieldCell class]]);
21
22 UITextField* textField = [[UITextField alloc] init];
23 EXPECT_NSEQ(nil, [textField superview]);
24 item.textField = textField;
25 [item configureCell:cell];
26 EXPECT_NSEQ(cell.contentView, [textField superview]);
27 EXPECT_TRUE(CGRectEqualToRect(cell.contentView.bounds, textField.frame));
28 }
29
30 } // namespace
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/settings/cells/byo_textfield_item.mm ('k') | ios/chrome/browser/ui/settings/cells/card_multiline_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698