| Index: content/browser/service_worker/service_worker_context_unittest.cc
|
| diff --git a/content/browser/service_worker/service_worker_context_unittest.cc b/content/browser/service_worker/service_worker_context_unittest.cc
|
| index c2bc110ab02ff23ac76da09292b6e3a010be0663..14f54f7cb508d11190ec63fec466119e9164a6d4 100644
|
| --- a/content/browser/service_worker/service_worker_context_unittest.cc
|
| +++ b/content/browser/service_worker/service_worker_context_unittest.cc
|
| @@ -56,7 +56,7 @@ ServiceWorkerContextCore::UnregistrationCallback MakeUnregisteredCallback(
|
| void ExpectRegisteredWorkers(
|
| ServiceWorkerStatusCode expect_status,
|
| int64 expect_version_id,
|
| - bool expect_pending,
|
| + bool expect_waiting,
|
| bool expect_active,
|
| ServiceWorkerStatusCode status,
|
| const scoped_refptr<ServiceWorkerRegistration>& registration) {
|
| @@ -66,12 +66,12 @@ void ExpectRegisteredWorkers(
|
| return;
|
| }
|
|
|
| - if (expect_pending) {
|
| - EXPECT_TRUE(registration->pending_version());
|
| + if (expect_waiting) {
|
| + EXPECT_TRUE(registration->waiting_version());
|
| EXPECT_EQ(expect_version_id,
|
| - registration->pending_version()->version_id());
|
| + registration->waiting_version()->version_id());
|
| } else {
|
| - EXPECT_FALSE(registration->pending_version());
|
| + EXPECT_FALSE(registration->waiting_version());
|
| }
|
|
|
| if (expect_active) {
|
| @@ -170,13 +170,13 @@ TEST_F(ServiceWorkerContextTest, Register) {
|
| base::Bind(&ExpectRegisteredWorkers,
|
| SERVICE_WORKER_OK,
|
| version_id,
|
| - false /* expect_pending */,
|
| + false /* expect_waiting */,
|
| true /* expect_active */));
|
| base::RunLoop().RunUntilIdle();
|
| }
|
|
|
| // Test registration when the service worker rejects the install event. The
|
| -// registration callback should indicate success, but there should be no pending
|
| +// registration callback should indicate success, but there should be no waiting
|
| // or active worker in the registration.
|
| TEST_F(ServiceWorkerContextTest, Register_RejectInstall) {
|
| helper_.reset(); // Make sure the process lookups stay overridden.
|
| @@ -213,13 +213,13 @@ TEST_F(ServiceWorkerContextTest, Register_RejectInstall) {
|
| base::Bind(&ExpectRegisteredWorkers,
|
| SERVICE_WORKER_ERROR_NOT_FOUND,
|
| kInvalidServiceWorkerVersionId,
|
| - false /* expect_pending */,
|
| + false /* expect_waiting */,
|
| false /* expect_active */));
|
| base::RunLoop().RunUntilIdle();
|
| }
|
|
|
| // Test registration when the service worker rejects the activate event. The
|
| -// registration callback should indicate success, but there should be no pending
|
| +// registration callback should indicate success, but there should be no waiting
|
| // or active worker in the registration.
|
| TEST_F(ServiceWorkerContextTest, Register_RejectActivate) {
|
| helper_.reset(); // Make sure the process lookups stay overridden.
|
| @@ -256,7 +256,7 @@ TEST_F(ServiceWorkerContextTest, Register_RejectActivate) {
|
| base::Bind(&ExpectRegisteredWorkers,
|
| SERVICE_WORKER_ERROR_NOT_FOUND,
|
| kInvalidServiceWorkerVersionId,
|
| - false /* expect_pending */,
|
| + false /* expect_waiting */,
|
| false /* expect_active */));
|
| base::RunLoop().RunUntilIdle();
|
| }
|
| @@ -295,7 +295,7 @@ TEST_F(ServiceWorkerContextTest, Unregister) {
|
| base::Bind(&ExpectRegisteredWorkers,
|
| SERVICE_WORKER_ERROR_NOT_FOUND,
|
| kInvalidServiceWorkerVersionId,
|
| - false /* expect_pending */,
|
| + false /* expect_waiting */,
|
| false /* expect_active */));
|
| base::RunLoop().RunUntilIdle();
|
| }
|
|
|