Chromium Code Reviews| Index: ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_most_visited_unittest.mm |
| diff --git a/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_most_visited_unittest.mm b/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_most_visited_unittest.mm |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a8f4ac3e0de4cc41cc7ad1a8f3b381745948cced |
| --- /dev/null |
| +++ b/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_most_visited_unittest.mm |
| @@ -0,0 +1,27 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_most_visited.h" |
| + |
| +#import "ios/chrome/browser/ui/favicon/favicon_attributes.h" |
| +#include "testing/gtest/include/gtest/gtest.h" |
| + |
| +#if !defined(__has_feature) || !__has_feature(objc_arc) |
| +#error "This file requires ARC support." |
| +#endif |
| + |
| +namespace { |
| + |
| +TEST(ContentSuggestionsMostVisitedTest, Constructor) { |
| + NSString* title = @"Test title"; |
| + FaviconAttributes* attributes = |
| + [[FaviconAttributes alloc] initWithImage:[[UIImage alloc] init]]; |
| + ContentSuggestionsMostVisited* mostVisited = |
| + [ContentSuggestionsMostVisited mostVisitedWithTitle:title |
| + attributes:attributes]; |
| + |
| + ASSERT_TRUE([title isEqualToString:mostVisited.title]); |
| + ASSERT_EQ(attributes, mostVisited.attributes); |
| +} |
|
lpromero
2017/04/07 15:16:12
Nit: new line.
gambard
2017/04/10 11:01:37
This is actually removed by clang format
|
| +} |