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

Side by Side Diff: ios/chrome/browser/ui/settings/cells/passphrase_error_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/passphrase_error_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 text label is set properly after a call to |configureCell:|.
17 TEST(PasswordDetailsItemTest, ConfigureCell) {
18 PassphraseErrorItem* item = [[PassphraseErrorItem alloc] initWithType:0];
19 PassphraseErrorCell* cell = [[[item cellClass] alloc] init];
20 EXPECT_TRUE([cell isMemberOfClass:[PassphraseErrorCell class]]);
21 EXPECT_NSEQ(nil, cell.textLabel.text);
22 NSString* text = @"This is an error";
23
24 item.text = text;
25 [item configureCell:cell];
26 EXPECT_NSEQ(text, cell.textLabel.text);
27 }
28
29 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698