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

Unified Diff: content/browser/service_worker/service_worker_job_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_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 1e27e8d4222677e11dcaf6eab0d204094d5b8763..fb1ab63317f5ae86e0dee8c1792129b1916766df 100644
--- a/content/browser/service_worker/service_worker_job_unittest.cc
+++ b/content/browser/service_worker/service_worker_job_unittest.cc
@@ -24,12 +24,15 @@ namespace {
void SaveRegistrationCallback(
ServiceWorkerStatusCode expected_status,
bool* called,
- scoped_refptr<ServiceWorkerRegistration>* registration,
+ scoped_refptr<ServiceWorkerRegistration>* registration_out,
ServiceWorkerStatusCode status,
- ServiceWorkerVersion* result) {
+ ServiceWorkerRegistration* registration,
+ ServiceWorkerVersion* version) {
+ ASSERT_TRUE(!version || version->registration_id() == registration->id())
+ << version << " " << registration;
EXPECT_EQ(expected_status, status);
*called = true;
- *registration = result ? result->registration() : NULL;
+ *registration_out = registration;
}
void SaveFoundRegistrationCallback(
@@ -453,8 +456,6 @@ TEST_F(ServiceWorkerJobTest, ParallelRegUnreg) {
ASSERT_TRUE(registration_called);
ASSERT_TRUE(unregistration_called);
- ASSERT_TRUE(registration->is_shutdown());
-
bool find_called = false;
storage()->FindRegistrationForPattern(
pattern,
@@ -507,8 +508,6 @@ TEST_F(ServiceWorkerJobTest, ParallelRegNewScript) {
base::RunLoop().RunUntilIdle();
- EXPECT_TRUE(registration1->is_shutdown());
- EXPECT_FALSE(registration2->is_shutdown());
ASSERT_EQ(registration2, registration);
}
« no previous file with comments | « content/browser/service_worker/service_worker_handle.cc ('k') | content/browser/service_worker/service_worker_provider_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698