Home | History | Annotate | Download | only in service_worker

Lines Matching defs:registration

29 // Unit tests for testing all job registration tasks.
41 ServiceWorkerRegistration* registration,
43 ASSERT_TRUE(!version || version->registration_id() == registration->id())
44 << version << " " << registration;
47 *registration_out = registration;
53 scoped_refptr<ServiceWorkerRegistration>* registration,
58 *registration = result;
62 // as well as the resulting registration. Whent the callback is fired,
69 scoped_refptr<ServiceWorkerRegistration>* registration) {
72 &SaveRegistrationCallback, expected_status, called, registration);
78 scoped_refptr<ServiceWorkerRegistration>* registration) {
83 registration);
225 // Make sure basic registration is working.
228 scoped_refptr<ServiceWorkerRegistration> registration;
233 SaveRegistration(SERVICE_WORKER_OK, &called, &registration));
239 ASSERT_NE(scoped_refptr<ServiceWorkerRegistration>(NULL), registration);
247 scoped_refptr<ServiceWorkerRegistration> registration;
252 SaveRegistration(SERVICE_WORKER_OK, &called, &registration));
265 ASSERT_TRUE(registration->HasOneRef());
270 &called, &registration));
276 ASSERT_EQ(scoped_refptr<ServiceWorkerRegistration>(NULL), registration);
293 // existing registration.
349 // combination, that the same registration is used.
424 scoped_refptr<ServiceWorkerRegistration> registration;
430 SERVICE_WORKER_ERROR_START_WORKER_FAILED, &called, &registration));
436 ASSERT_EQ(scoped_refptr<ServiceWorkerRegistration>(NULL), registration);
446 scoped_refptr<ServiceWorkerRegistration> registration;
451 SaveRegistration(SERVICE_WORKER_OK, &registration_called, &registration));
468 SERVICE_WORKER_ERROR_NOT_FOUND, &find_called, &registration));
472 ASSERT_EQ(scoped_refptr<ServiceWorkerRegistration>(), registration);
476 // registration should win, and the old registration should have been
507 scoped_refptr<ServiceWorkerRegistration> registration;
512 SERVICE_WORKER_OK, &find_called, &registration));
516 ASSERT_EQ(registration2, registration);
520 // coalesced such that both callers get the exact same registration
552 scoped_refptr<ServiceWorkerRegistration> registration;
557 SERVICE_WORKER_OK, &find_called, &registration));
560 ASSERT_EQ(registration, registration1);
589 scoped_refptr<ServiceWorkerRegistration> registration;
594 SERVICE_WORKER_ERROR_NOT_FOUND, &find_called, &registration));
597 ASSERT_EQ(scoped_refptr<ServiceWorkerRegistration>(), registration);
682 scoped_refptr<ServiceWorkerRegistration> registration;
688 &registration_called, &registration));
708 SERVICE_WORKER_ERROR_NOT_FOUND, &find_called, &registration));
712 EXPECT_EQ(scoped_refptr<ServiceWorkerRegistration>(), registration);
718 scoped_refptr<ServiceWorkerRegistration> registration;
725 SaveRegistration(SERVICE_WORKER_OK, &called, &registration));
728 ASSERT_TRUE(registration.get());
733 registration.get(), script_url, 1L, helper_->context()->AsWeakPtr());
740 registration->SetWaitingVersion(version.get());
760 scoped_refptr<ServiceWorkerRegistration> registration;
766 SaveRegistration(SERVICE_WORKER_OK, &called, &registration));
769 ASSERT_TRUE(registration.get());
771 scoped_refptr<ServiceWorkerVersion> version = registration->active_version();
791 scoped_refptr<ServiceWorkerRegistration> registration;
797 SaveRegistration(SERVICE_WORKER_OK, &called, &registration));
800 ASSERT_TRUE(registration.get());
807 registration->active_version()->AddControllee(host.get());
809 scoped_refptr<ServiceWorkerVersion> version = registration->active_version();
823 registration->active_version()->RemoveControllee(host.get());
915 scoped_refptr<ServiceWorkerRegistration> registration;
921 SaveRegistration(SERVICE_WORKER_OK, &called, &registration));
924 EXPECT_TRUE(registration.get());
925 EXPECT_TRUE(registration->active_version());
926 EXPECT_FALSE(registration->installing_version());
927 EXPECT_FALSE(registration->waiting_version());
928 registration_ = registration;
929 return registration;
967 ServiceWorkerRegistration* registration,
971 entry.registration_id = registration->id();
978 ServiceWorkerRegistration* registration) OVERRIDE {
983 ServiceWorkerRegistration* registration) OVERRIDE {
988 ServiceWorkerRegistration* registration) OVERRIDE {
1014 scoped_refptr<ServiceWorkerRegistration> registration =
1016 ASSERT_TRUE(registration.get());
1029 registration->AddListener(update_helper);
1031 registration->active_version();
1036 ASSERT_TRUE(registration->active_version());
1037 EXPECT_EQ(first_version.get(), registration->active_version());
1038 EXPECT_FALSE(registration->installing_version());
1039 EXPECT_FALSE(registration->waiting_version());
1042 EXPECT_NE(registration->active_version()->version_id(),
1053 scoped_refptr<ServiceWorkerRegistration> registration =
1055 ASSERT_TRUE(registration.get());
1059 registration->AddListener(update_helper);
1061 registration->active_version();
1066 ASSERT_TRUE(registration->active_version());
1067 EXPECT_NE(first_version.get(), registration->active_version());
1068 EXPECT_FALSE(registration->installing_version());
1069 EXPECT_FALSE(registration->waiting_version());
1103 EXPECT_EQ(registration->active_version()->version_id(),
1108 EXPECT_EQ(registration->active_version()->version_id(),
1118 EXPECT_EQ(registration->active_version()->version_id(),
1123 EXPECT_EQ(registration->active_version()->version_id(),
1133 scoped_refptr<ServiceWorkerRegistration> registration;
1138 SaveRegistration(SERVICE_WORKER_OK, &called, &registration));
1143 ServiceWorkerVersion* active_version = registration->active_version();
1146 job_coordinator()->Update(registration.get());
1150 new ServiceWorkerVersion(registration.get(),
1154 registration->SetWaitingVersion(version.get());
1158 // Verify the registration was not modified by the Update.
1159 EXPECT_EQ(active_version, registration->active_version());
1160 EXPECT_EQ(version.get(), registration->waiting_version());
1161 EXPECT_EQ(NULL, registration->installing_version());
1166 scoped_refptr<ServiceWorkerRegistration> registration;
1171 SaveRegistration(SERVICE_WORKER_OK, &called, &registration));
1183 ServiceWorkerVersion* active_version = registration->active_version();
1189 job_coordinator()->Update(registration.get());
1195 // Verify the registration was not modified by the Update.
1196 EXPECT_TRUE(registration->is_uninstalling());
1197 EXPECT_EQ(active_version, registration->active_version());
1198 EXPECT_EQ(NULL, registration->waiting_version());
1199 EXPECT_EQ(NULL, registration->installing_version());