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

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

Issue 554573002: SWRegistration::unregister returns false when the registration is already unregistered. (2/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add const Created 6 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 879316950dcfdf0e51cd5bba5ce2c78a43a10e23..70495bb642d6fee5fbb9d962bfa0feec4bb9361a 100644
--- a/content/browser/service_worker/service_worker_job_unittest.cc
+++ b/content/browser/service_worker/service_worker_job_unittest.cc
@@ -280,8 +280,9 @@ TEST_F(ServiceWorkerJobTest, Unregister_NothingRegistered) {
GURL pattern("http://www.example.com/");
bool called;
- job_coordinator()->Unregister(pattern,
- SaveUnregistration(SERVICE_WORKER_OK, &called));
+ job_coordinator()->Unregister(
+ pattern,
+ SaveUnregistration(SERVICE_WORKER_ERROR_NOT_FOUND, &called));
ASSERT_FALSE(called);
base::RunLoop().RunUntilIdle();
@@ -567,11 +568,14 @@ TEST_F(ServiceWorkerJobTest, ParallelUnreg) {
bool unregistration1_called = false;
job_coordinator()->Unregister(
pattern,
- SaveUnregistration(SERVICE_WORKER_OK, &unregistration1_called));
+ SaveUnregistration(SERVICE_WORKER_ERROR_NOT_FOUND,
+ &unregistration1_called));
bool unregistration2_called = false;
job_coordinator()->Unregister(
- pattern, SaveUnregistration(SERVICE_WORKER_OK, &unregistration2_called));
+ pattern,
+ SaveUnregistration(SERVICE_WORKER_ERROR_NOT_FOUND,
+ &unregistration2_called));
ASSERT_FALSE(unregistration1_called);
ASSERT_FALSE(unregistration2_called);

Powered by Google App Engine
This is Rietveld 408576698