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

Unified Diff: ios/chrome/browser/ui/content_suggestions/content_suggestions_article_item_unittest.mm

Issue 2697573002: Modify article item in ContentSuggestions (Closed)
Patch Set: Fix tests Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/content_suggestions/content_suggestions_article_item_unittest.mm
diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_article_item_unittest.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestions_article_item_unittest.mm
index dde70de8113ddb7573e0cb784f840da5d7bb90fd..30f5fd4f98f7f19bd90e97fef4467a09b9f08da6 100644
--- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_article_item_unittest.mm
+++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_article_item_unittest.mm
@@ -5,6 +5,7 @@
#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_article_item.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "url/gurl.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
@@ -17,13 +18,16 @@ TEST(ContentSuggestionsArticleItemTest, CellIsConfigured) {
NSString* title = @"testTitle";
NSString* subtitle = @"testSubtitle";
UIImage* image = [[UIImage alloc] init];
+ GURL url = GURL("http://chromium.org");
ContentSuggestionsArticleItem* item =
[[ContentSuggestionsArticleItem alloc] initWithType:0
title:title
subtitle:subtitle
- image:image];
+ image:image
+ url:url];
ContentSuggestionsArticleCell* cell = [[[item cellClass] alloc] init];
EXPECT_EQ([ContentSuggestionsArticleCell class], [cell class]);
+ EXPECT_EQ(url, item.articleURL);
[item configureCell:cell];
EXPECT_EQ(title, cell.titleLabel.text);

Powered by Google App Engine
This is Rietveld 408576698