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

Side by Side Diff: ios/chrome/browser/ui/settings/cells/copied_to_chrome_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/copied_to_chrome_item.h"
6
7 #include "components/strings/grit/components_strings.h"
8 #include "ios/chrome/grit/ios_chromium_strings.h"
9 #import "ios/third_party/material_components_ios/src/components/Buttons/src/Mate rialButtons.h"
10 #include "testing/gtest/include/gtest/gtest.h"
11 #include "testing/gtest_mac.h"
12 #include "ui/base/l10n/l10n_util_mac.h"
13
14 #if !defined(__has_feature) || !__has_feature(objc_arc)
15 #error "This file requires ARC support."
16 #endif
17
18 namespace {
19
20 // Tests that the cell created out of a CopiedToChromeItem is set up properly.
21 TEST(CopiedToChromeItemTest, InitializeCell) {
22 CopiedToChromeItem* item = [[CopiedToChromeItem alloc] initWithType:0];
23
24 id cell = [[[item cellClass] alloc] init];
25 ASSERT_TRUE([cell isMemberOfClass:[CopiedToChromeCell class]]);
26
27 CopiedToChromeCell* copiedToChromeCell = cell;
28 EXPECT_NSEQ(l10n_util::GetNSString(IDS_IOS_AUTOFILL_DESCRIBE_LOCAL_COPY),
29 copiedToChromeCell.textLabel.text);
30 EXPECT_NSEQ([l10n_util::GetNSString(IDS_AUTOFILL_CLEAR_LOCAL_COPY_BUTTON)
31 uppercaseString],
32 [copiedToChromeCell.button titleForState:UIControlStateNormal]);
33 }
34
35 } // namespace
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/settings/cells/copied_to_chrome_item.mm ('k') | ios/chrome/browser/ui/settings/cells/encryption_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698