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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/ntp/snippets/ArticleSnippetsTest.java

Issue 2686063003: [remote suggestions] Attach the fetch time to RemoteSnippets, ContentSnippets and SnippetArticle (Closed)
Patch Set: rebase 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: chrome/android/javatests/src/org/chromium/chrome/browser/ntp/snippets/ArticleSnippetsTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/snippets/ArticleSnippetsTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/snippets/ArticleSnippetsTest.java
index 573c40e5eac2bf825c7db41bcf4db5a6e1067e21..cc7666ec83e5a9efa50f657a24d723afe3787145 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/snippets/ArticleSnippetsTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/snippets/ArticleSnippetsTest.java
@@ -134,8 +134,9 @@ public class ArticleSnippetsTest extends ChromeActivityTestCaseBase<ChromeActivi
int minimalCategory = 1;
SnippetArticle shortSnippet = new SnippetArticle(fullCategory, "id1", "Snippet",
"Publisher", "Preview Text", "www.google.com",
- 1466614774, // Timestamp
- 10f); // Score
+ 1466614774, // Publish timestamp
+ 10f, // Score
+ 1466634774); // Fetch timestamp
shortSnippet.setThumbnailBitmap(BitmapFactory.decodeResource(getActivity().getResources(),
R.drawable.signin_promo_illustration));
@@ -143,19 +144,22 @@ public class ArticleSnippetsTest extends ChromeActivityTestCaseBase<ChromeActivi
new String(new char[20]).replace("\0", "Snippet "),
new String(new char[20]).replace("\0", "Publisher "),
new String(new char[80]).replace("\0", "Preview Text "), "www.google.com",
- 1466614074, // Timestamp
- 20f); // Score
+ 1466614074, // Publish timestamp
+ 20f, // Score
+ 1466634774); // Fetch timestamp
SnippetArticle minimalSnippet = new SnippetArticle(minimalCategory, "id3",
new String(new char[20]).replace("\0", "Bookmark "), "Publisher",
"This should not be displayed", "www.google.com",
- 1466614774, // Timestamp
- 10f); // Score
+ 1466614774, // Publish timestamp
+ 10f, // Score
+ 1466634774); // Fetch timestamp
SnippetArticle minimalSnippet2 = new SnippetArticle(minimalCategory, "id4", "Bookmark",
"Publisher", "This should not be displayed", "www.google.com",
- 1466614774, // Timestamp
- 10f); // Score
+ 1466614774, // Publish timestamp
+ 10f, // Score
+ 1466634774); // Fetch timestamp
mSnippetsSource.setInfoForCategory(
fullCategory, new SuggestionsCategoryInfo(fullCategory, "Section Title",

Powered by Google App Engine
This is Rietveld 408576698