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

Unified Diff: content/browser/service_worker/service_worker_job_unittest.cc

Issue 1283273002: Service Worker: Change last update check location and HTTP cache bypass rule (2/2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comments. Created 5 years, 3 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: content/browser/service_worker/service_worker_job_unittest.cc
diff --git a/content/browser/service_worker/service_worker_job_unittest.cc b/content/browser/service_worker/service_worker_job_unittest.cc
index e49c8294d64896eb2982149518a22db44f21098e..45ba5ef6264411317a5a3e8e581e40c5ddf8e8b7 100644
--- a/content/browser/service_worker/service_worker_job_unittest.cc
+++ b/content/browser/service_worker/service_worker_job_unittest.cc
@@ -963,31 +963,6 @@ TEST_F(ServiceWorkerJobTest, Update_NoChange) {
EXPECT_FALSE(update_helper->update_found_);
}
-TEST_F(ServiceWorkerJobTest, Update_BumpLastUpdateCheckTime) {
- const base::Time kToday = base::Time::Now();
- const base::Time kYesterday =
- kToday - base::TimeDelta::FromDays(1) - base::TimeDelta::FromHours(1);
- UpdateJobTestHelper* update_helper =
- new UpdateJobTestHelper(render_process_id_);
- helper_.reset(update_helper);
- scoped_refptr<ServiceWorkerRegistration> registration =
- update_helper->SetupInitialRegistration(kNoChangeOrigin);
-
- // Run an update where the last update check was less than 24 hours ago. The
- // check time shouldn't change, as we didn't bypass cache.
- registration->set_last_update_check(kToday);
- registration->active_version()->StartUpdate();
- base::RunLoop().RunUntilIdle();
- EXPECT_EQ(kToday, registration->last_update_check());
-
- // Run an update where the last update check was over 24 hours ago. The
- // check time should change, as the cache was bypassed.
- registration->set_last_update_check(kYesterday);
- registration->active_version()->StartUpdate();
- base::RunLoop().RunUntilIdle();
- EXPECT_LT(kYesterday, registration->last_update_check());
-}
-
TEST_F(ServiceWorkerJobTest, Update_NewVersion) {
UpdateJobTestHelper* update_helper =
new UpdateJobTestHelper(render_process_id_);

Powered by Google App Engine
This is Rietveld 408576698