| 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 c984132c363dd4ea5ddd869bb49de0aa35c2d941..0a074c59e712b4dba5aad483982a94ac12d21672 100644
|
| --- a/content/browser/service_worker/service_worker_job_unittest.cc
|
| +++ b/content/browser/service_worker/service_worker_job_unittest.cc
|
| @@ -288,8 +288,8 @@
|
| ASSERT_TRUE(called);
|
| }
|
|
|
| -// Make sure registering a new script creates a new version and shares an
|
| -// existing registration.
|
| +// Make sure that when a new registration replaces an existing
|
| +// registration, that the old one is cleaned up.
|
| TEST_F(ServiceWorkerJobTest, RegisterNewScript) {
|
| GURL pattern("http://www.example.com/");
|
|
|
| @@ -329,7 +329,9 @@
|
| base::RunLoop().RunUntilIdle();
|
| ASSERT_TRUE(called);
|
|
|
| - ASSERT_EQ(old_registration, new_registration);
|
| + ASSERT_TRUE(old_registration->HasOneRef());
|
| +
|
| + ASSERT_NE(old_registration, new_registration);
|
|
|
| scoped_refptr<ServiceWorkerRegistration> new_registration_by_pattern;
|
| storage()->FindRegistrationForPattern(
|
|
|