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

Unified Diff: chrome/browser/web_resource/promo_resource_service_unittest.cc

Issue 10837074: Enable PromoResourceServiceTest (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Comments Created 8 years, 4 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
« no previous file with comments | « build/android/gtest_filter/unit_tests_disabled ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/web_resource/promo_resource_service_unittest.cc
diff --git a/chrome/browser/web_resource/promo_resource_service_unittest.cc b/chrome/browser/web_resource/promo_resource_service_unittest.cc
index 3e41afc0a78e2c428b8c6c86f4bec9750894d13e..c3570b4998ed0e55ae8c2ed2f83756a63e22f224 100644
--- a/chrome/browser/web_resource/promo_resource_service_unittest.cc
+++ b/chrome/browser/web_resource/promo_resource_service_unittest.cc
@@ -456,7 +456,7 @@ TEST_F(PromoResourceServiceTest, NotificationPromoTest) {
" \"date\":"
" ["
" {"
- " \"start\":\"15 Jan 2012 10:50:85 PST\","
+ " \"start\":\"3 Aug 1999 9:26:06 GMT\","
" \"end\":\"7 Jan 2013 5:40:75 PST\""
" }"
" ],"
@@ -496,8 +496,11 @@ TEST_F(PromoResourceServiceTest, NotificationPromoTest) {
"Like Chrome? Go http://www.google.com/chrome/",
"It\'s simple. Go http://www.google.com/chrome/",
"ACTION_EMAIL", "This is the body.", "XXX value",
- 1326653485, // unix epoch for 15 Jan 2012 10:50:85 PST.
- 1357566075, // unix epoch for 7 Jan 2013 5:40:75 PST.
+ // We hardcode the unix epoch time to make sure our parsing works.
+ // The starting date is in 1999 to make tests pass on Android devices
+ // with incorrect or unset date/time.
+ 933672366, // unix epoch for 3 Aug 1999 9:26:06 GMT.
+ 1357566075, // unix epoch for 7 Jan 2013 5:40:75 PST.
1000, 200, 100, 3600, 400, 30, false);
#endif // !defined(OS_ANDROID)
« no previous file with comments | « build/android/gtest_filter/unit_tests_disabled ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698