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

Unified Diff: chromeos/timezone/timezone_unittest.cc

Issue 834073002: ChromeOS: Implement periodic timezone refresh on geolocation data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix rebase. Created 5 years, 11 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 | « chromeos/timezone/timezone_resolver.cc ('k') | tools/metrics/actions/actions.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/timezone/timezone_unittest.cc
diff --git a/chromeos/timezone/timezone_unittest.cc b/chromeos/timezone/timezone_unittest.cc
index 392e9afb2baf314e0759af3b757415209b56904a..9e05fe0e8670e846b9767c024129a638c8fdf032 100644
--- a/chromeos/timezone/timezone_unittest.cc
+++ b/chromeos/timezone/timezone_unittest.cc
@@ -6,6 +6,7 @@
#include "base/run_loop.h"
#include "chromeos/geolocation/geoposition.h"
#include "chromeos/timezone/timezone_provider.h"
+#include "chromeos/timezone/timezone_resolver.h"
#include "net/http/http_response_headers.h"
#include "net/http/http_status_code.h"
#include "net/url_request/test_url_fetcher_factory.h"
@@ -284,4 +285,13 @@ TEST_F(TimeZoneTest, InvalidResponse) {
}
}
+TEST(TimeZoneResolverTest, CheckIntervals) {
+ for (int requests_count = 1; requests_count < 10; ++requests_count) {
+ EXPECT_EQ(requests_count,
+ TimeZoneResolver::MaxRequestsCountForIntervalForTesting(
+ TimeZoneResolver::IntervalForNextRequestForTesting(
+ requests_count)));
+ }
+}
+
} // namespace chromeos
« no previous file with comments | « chromeos/timezone/timezone_resolver.cc ('k') | tools/metrics/actions/actions.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698