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

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

Issue 224733014: Introduce ServiceWorkerHandle for tracking WebServiceWorkerImpl reference (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sigh, rebased Created 6 years, 8 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 c656439c66a09c56e9106735a9a7ff2b0fe34c86..efbf4df1e4361bec072c56278b016b974d0ca204 100644
--- a/content/browser/service_worker/service_worker_registration_unittest.cc
+++ b/content/browser/service_worker/service_worker_registration_unittest.cc
@@ -32,28 +32,6 @@ class ServiceWorkerRegistrationTest : public testing::Test {
BrowserThreadImpl io_thread_;
};
-TEST_F(ServiceWorkerRegistrationTest, Shutdown) {
- const int64 registration_id = -1L;
- const int64 version_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_);
-
- scoped_refptr<ServiceWorkerVersion> active_version =
- new ServiceWorkerVersion(registration, version_id, context_ptr_);
- registration->set_active_version(active_version);
-
- registration->Shutdown();
-
- DCHECK(registration->is_shutdown());
- DCHECK(active_version->is_shutdown());
- DCHECK(registration->HasOneRef());
- DCHECK(active_version->HasOneRef());
-}
-
// Make sure that activation does not leak
TEST_F(ServiceWorkerRegistrationTest, ActivatePending) {
int64 registration_id = -1L;
@@ -77,19 +55,10 @@ TEST_F(ServiceWorkerRegistrationTest, ActivatePending) {
registration->ActivatePendingVersion();
DCHECK_EQ(version_2, registration->active_version());
- DCHECK(version_1->is_shutdown());
DCHECK(version_1->HasOneRef());
version_1 = NULL;
- DCHECK(!version_2->is_shutdown());
DCHECK(!version_2->HasOneRef());
-
- registration->Shutdown();
-
- DCHECK(registration->is_shutdown());
- DCHECK(version_2->is_shutdown());
- DCHECK(registration->HasOneRef());
- DCHECK(version_2->HasOneRef());
}
} // namespace content
« no previous file with comments | « content/browser/service_worker/service_worker_registration.cc ('k') | content/browser/service_worker/service_worker_storage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698