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

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

Issue 360123002: ServiceWorker: some more groundwork in support of the update process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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_registration_unittest.cc
diff --git a/content/browser/service_worker/service_worker_registration_unittest.cc b/content/browser/service_worker/service_worker_registration_unittest.cc
index ccce641752630200efd805e6bf96155f83ae86ad..02d236fb66a5892dc5fecd797c711d5ac0f85358 100644
--- a/content/browser/service_worker/service_worker_registration_unittest.cc
+++ b/content/browser/service_worker/service_worker_registration_unittest.cc
@@ -44,33 +44,4 @@ class ServiceWorkerRegistrationTest : public testing::Test {
BrowserThreadImpl io_thread_;
};
-// Make sure that activation does not leak
-TEST_F(ServiceWorkerRegistrationTest, ActivatePending) {
- int64 registration_id = -1L;
- scoped_refptr<ServiceWorkerRegistration> registration =
- new ServiceWorkerRegistration(
- GURL("http://www.example.com/*"),
- GURL("http://www.example.com/service_worker.js"),
- registration_id,
- context_ptr_);
-
- const int64 version_1_id = 1L;
- const int64 version_2_id = 2L;
- scoped_refptr<ServiceWorkerVersion> version_1 =
- new ServiceWorkerVersion(registration, version_1_id, context_ptr_);
- version_1->SetStatus(ServiceWorkerVersion::ACTIVE);
- registration->set_active_version(version_1);
-
- scoped_refptr<ServiceWorkerVersion> version_2 =
- new ServiceWorkerVersion(registration, version_2_id, context_ptr_);
- registration->set_waiting_version(version_2);
-
- registration->ActivateWaitingVersion();
- DCHECK_EQ(version_2, registration->active_version());
- DCHECK(version_1->HasOneRef());
- version_1 = NULL;
-
- DCHECK(!version_2->HasOneRef());
-}
-
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698