| Index: content/browser/background_sync/background_sync_manager_unittest.cc
|
| diff --git a/content/browser/background_sync/background_sync_manager_unittest.cc b/content/browser/background_sync/background_sync_manager_unittest.cc
|
| index e80881c12ee41f3cca8082c5e93781397412db4b..f239f18e8986105758a149e633a8f311c7895221 100644
|
| --- a/content/browser/background_sync/background_sync_manager_unittest.cc
|
| +++ b/content/browser/background_sync/background_sync_manager_unittest.cc
|
| @@ -12,6 +12,7 @@
|
| #include "base/run_loop.h"
|
| #include "base/single_thread_task_runner.h"
|
| #include "base/thread_task_runner_handle.h"
|
| +#include "content/browser/background_sync/background_sync_registration_handle.h"
|
| #include "content/browser/background_sync/background_sync_status.h"
|
| #include "content/browser/browser_thread_impl.h"
|
| #include "content/browser/service_worker/embedded_worker_test_helper.h"
|
| @@ -127,6 +128,7 @@ class TestBackgroundSyncManager : public BackgroundSyncManager {
|
| }
|
|
|
| void Continue() {
|
| + ASSERT_FALSE(continuation_.is_null());
|
| continuation_.Run();
|
| continuation_.Reset();
|
| }
|
| @@ -184,15 +186,11 @@ class TestBackgroundSyncManager : public BackgroundSyncManager {
|
| }
|
|
|
| void FireOneShotSync(
|
| - const BackgroundSyncRegistration& registration,
|
| + const BackgroundSyncManager::RefCountedRegistration& registration,
|
| const scoped_refptr<ServiceWorkerVersion>& active_version,
|
| const ServiceWorkerVersion::StatusCallback& callback) override {
|
| - if (one_shot_callback_.is_null()) {
|
| - BackgroundSyncManager::FireOneShotSync(registration, active_version,
|
| - callback);
|
| - } else {
|
| - one_shot_callback_.Run(active_version, callback);
|
| - }
|
| + ASSERT_FALSE(one_shot_callback_.is_null());
|
| + one_shot_callback_.Run(active_version, callback);
|
| }
|
|
|
| private:
|
| @@ -305,19 +303,20 @@ class BackgroundSyncManagerTest : public testing::Test {
|
| void StatusAndRegistrationCallback(
|
| bool* was_called,
|
| BackgroundSyncStatus status,
|
| - const BackgroundSyncRegistration& registration) {
|
| + scoped_ptr<BackgroundSyncRegistrationHandle> registration) {
|
| *was_called = true;
|
| callback_status_ = status;
|
| - callback_registration_ = registration;
|
| + callback_registration_ = registration.Pass();
|
| }
|
|
|
| void StatusAndRegistrationsCallback(
|
| bool* was_called,
|
| BackgroundSyncStatus status,
|
| - const std::vector<BackgroundSyncRegistration>& registrations) {
|
| + scoped_ptr<ScopedVector<BackgroundSyncRegistrationHandle>>
|
| + registrations) {
|
| *was_called = true;
|
| callback_status_ = status;
|
| - callback_registrations_ = registrations;
|
| + callback_registrations_ = registrations.Pass();
|
| }
|
|
|
| void StatusCallback(bool* was_called, BackgroundSyncStatus status) {
|
| @@ -327,6 +326,8 @@ class BackgroundSyncManagerTest : public testing::Test {
|
|
|
| protected:
|
| void CreateBackgroundSyncManager() {
|
| + ClearRegistrations();
|
| +
|
| test_background_sync_manager_ =
|
| new TestBackgroundSyncManager(helper_->context_wrapper());
|
| background_sync_manager_.reset(test_background_sync_manager_);
|
| @@ -343,6 +344,12 @@ class BackgroundSyncManagerTest : public testing::Test {
|
| SetNetwork(net::NetworkChangeNotifier::CONNECTION_NONE);
|
| }
|
|
|
| + // Clear the registrations so that the BackgroundSyncManager can release them.
|
| + void ClearRegistrations() {
|
| + callback_registration_.reset();
|
| + callback_registrations_.reset();
|
| + }
|
| +
|
| void SetupBackgroundSyncManager() {
|
| CreateBackgroundSyncManager();
|
| InitBackgroundSyncManager();
|
| @@ -361,6 +368,7 @@ class BackgroundSyncManagerTest : public testing::Test {
|
| }
|
|
|
| void DeleteBackgroundSyncManager() {
|
| + ClearRegistrations();
|
| background_sync_manager_.reset();
|
| test_background_sync_manager_ = nullptr;
|
| }
|
| @@ -382,18 +390,17 @@ class BackgroundSyncManagerTest : public testing::Test {
|
| return callback_status_ == BACKGROUND_SYNC_STATUS_OK;
|
| }
|
|
|
| - bool Unregister(const BackgroundSyncRegistration& sync_registration) {
|
| + bool Unregister(BackgroundSyncRegistrationHandle* sync_registration) {
|
| return UnregisterWithServiceWorkerId(sw_registration_id_1_,
|
| sync_registration);
|
| }
|
|
|
| bool UnregisterWithServiceWorkerId(
|
| int64 sw_registration_id,
|
| - const BackgroundSyncRegistration& sync_registration) {
|
| + BackgroundSyncRegistrationHandle* sync_registration) {
|
| bool was_called = false;
|
| - background_sync_manager_->Unregister(
|
| - sw_registration_id, sync_registration.options()->tag,
|
| - sync_registration.options()->periodicity, sync_registration.id(),
|
| + sync_registration->Unregister(
|
| + sw_registration_id,
|
| base::Bind(&BackgroundSyncManagerTest::StatusCallback,
|
| base::Unretained(this), &was_called));
|
| base::RunLoop().RunUntilIdle();
|
| @@ -419,7 +426,7 @@ class BackgroundSyncManagerTest : public testing::Test {
|
|
|
| if (callback_status_ == BACKGROUND_SYNC_STATUS_OK) {
|
| EXPECT_STREQ(sync_options.tag.c_str(),
|
| - callback_registration_.options()->tag.c_str());
|
| + callback_registration_->options()->tag.c_str());
|
| }
|
|
|
| return callback_status_ == BACKGROUND_SYNC_STATUS_OK;
|
| @@ -514,8 +521,9 @@ class BackgroundSyncManagerTest : public testing::Test {
|
|
|
| // Callback values.
|
| BackgroundSyncStatus callback_status_;
|
| - BackgroundSyncRegistration callback_registration_;
|
| - std::vector<BackgroundSyncRegistration> callback_registrations_;
|
| + scoped_ptr<BackgroundSyncRegistrationHandle> callback_registration_;
|
| + scoped_ptr<ScopedVector<BackgroundSyncRegistrationHandle>>
|
| + callback_registrations_;
|
| ServiceWorkerStatusCode callback_sw_status_code_;
|
| int sync_events_called_;
|
| ServiceWorkerVersion::StatusCallback sync_fired_callback_;
|
| @@ -528,8 +536,8 @@ TEST_F(BackgroundSyncManagerTest, Register) {
|
| TEST_F(BackgroundSyncManagerTest, RegistractionIntact) {
|
| EXPECT_TRUE(Register(sync_options_1_));
|
| EXPECT_STREQ(sync_options_1_.tag.c_str(),
|
| - callback_registration_.options()->tag.c_str());
|
| - EXPECT_TRUE(callback_registration_.IsValid());
|
| + callback_registration_->options()->tag.c_str());
|
| + EXPECT_TRUE(callback_registration_->IsValid());
|
| }
|
|
|
| TEST_F(BackgroundSyncManagerTest, RegisterWithoutLiveSWRegistration) {
|
| @@ -544,22 +552,17 @@ TEST_F(BackgroundSyncManagerTest, RegisterWithoutActiveSWRegistration) {
|
| EXPECT_EQ(BACKGROUND_SYNC_STATUS_NO_SERVICE_WORKER, callback_status_);
|
| }
|
|
|
| -TEST_F(BackgroundSyncManagerTest, RegisterExistingKeepsId) {
|
| - EXPECT_TRUE(Register(sync_options_1_));
|
| - BackgroundSyncRegistration first_registration = callback_registration_;
|
| - EXPECT_TRUE(Register(sync_options_1_));
|
| - EXPECT_TRUE(callback_registration_.Equals(first_registration));
|
| - EXPECT_EQ(first_registration.id(), callback_registration_.id());
|
| -}
|
| -
|
| TEST_F(BackgroundSyncManagerTest, RegisterOverwrites) {
|
| EXPECT_TRUE(Register(sync_options_1_));
|
| - BackgroundSyncRegistration first_registration = callback_registration_;
|
| + scoped_ptr<BackgroundSyncRegistrationHandle> first_registration =
|
| + callback_registration_.Pass();
|
|
|
| sync_options_1_.min_period = 100;
|
| EXPECT_TRUE(Register(sync_options_1_));
|
| - EXPECT_LT(first_registration.id(), callback_registration_.id());
|
| - EXPECT_FALSE(callback_registration_.Equals(first_registration));
|
| + EXPECT_LT(first_registration->handle_id(),
|
| + callback_registration_->handle_id());
|
| + EXPECT_FALSE(first_registration->options()->Equals(
|
| + *callback_registration_->options()));
|
| }
|
|
|
| TEST_F(BackgroundSyncManagerTest, RegisterOverlappingPeriodicAndOneShotTags) {
|
| @@ -572,9 +575,9 @@ TEST_F(BackgroundSyncManagerTest, RegisterOverlappingPeriodicAndOneShotTags) {
|
| EXPECT_TRUE(Register(sync_options_1_));
|
| EXPECT_TRUE(Register(sync_options_2_));
|
| EXPECT_TRUE(GetRegistration(sync_options_1_));
|
| - EXPECT_EQ(SYNC_PERIODIC, callback_registration_.options()->periodicity);
|
| + EXPECT_EQ(SYNC_PERIODIC, callback_registration_->options()->periodicity);
|
| EXPECT_TRUE(GetRegistration(sync_options_2_));
|
| - EXPECT_EQ(SYNC_ONE_SHOT, callback_registration_.options()->periodicity);
|
| + EXPECT_EQ(SYNC_ONE_SHOT, callback_registration_->options()->periodicity);
|
| }
|
|
|
| TEST_F(BackgroundSyncManagerTest, RegisterBadBackend) {
|
| @@ -614,15 +617,15 @@ TEST_F(BackgroundSyncManagerTest, GetRegistrationBadBackend) {
|
|
|
| TEST_F(BackgroundSyncManagerTest, GetRegistrationsZero) {
|
| EXPECT_TRUE(GetRegistrations(SYNC_ONE_SHOT));
|
| - EXPECT_EQ(0u, callback_registrations_.size());
|
| + EXPECT_EQ(0u, callback_registrations_->size());
|
| }
|
|
|
| TEST_F(BackgroundSyncManagerTest, GetRegistrationsOne) {
|
| EXPECT_TRUE(Register(sync_options_1_));
|
| EXPECT_TRUE(GetRegistrations(sync_options_1_.periodicity));
|
|
|
| - EXPECT_EQ(1u, callback_registrations_.size());
|
| - sync_options_1_.Equals(*callback_registrations_[0].options());
|
| + EXPECT_EQ(1u, callback_registrations_->size());
|
| + sync_options_1_.Equals(*(*callback_registrations_)[0]->options());
|
| }
|
|
|
| TEST_F(BackgroundSyncManagerTest, GetRegistrationsTwo) {
|
| @@ -632,9 +635,9 @@ TEST_F(BackgroundSyncManagerTest, GetRegistrationsTwo) {
|
| EXPECT_TRUE(Register(sync_options_2_));
|
| EXPECT_TRUE(GetRegistrations(sync_options_1_.periodicity));
|
|
|
| - EXPECT_EQ(2u, callback_registrations_.size());
|
| - sync_options_1_.Equals(*callback_registrations_[0].options());
|
| - sync_options_2_.Equals(*callback_registrations_[1].options());
|
| + EXPECT_EQ(2u, callback_registrations_->size());
|
| + sync_options_1_.Equals(*(*callback_registrations_)[0]->options());
|
| + sync_options_2_.Equals(*(*callback_registrations_)[1]->options());
|
| }
|
|
|
| TEST_F(BackgroundSyncManagerTest, GetRegistrationsPeriodicity) {
|
| @@ -644,12 +647,12 @@ TEST_F(BackgroundSyncManagerTest, GetRegistrationsPeriodicity) {
|
| EXPECT_TRUE(Register(sync_options_2_));
|
|
|
| EXPECT_TRUE(GetRegistrations(SYNC_ONE_SHOT));
|
| - EXPECT_EQ(1u, callback_registrations_.size());
|
| - sync_options_1_.Equals(*callback_registrations_[0].options());
|
| + EXPECT_EQ(1u, callback_registrations_->size());
|
| + sync_options_1_.Equals(*(*callback_registrations_)[0]->options());
|
|
|
| EXPECT_TRUE(GetRegistrations(SYNC_PERIODIC));
|
| - EXPECT_EQ(1u, callback_registrations_.size());
|
| - sync_options_2_.Equals(*callback_registrations_[0].options());
|
| + EXPECT_EQ(1u, callback_registrations_->size());
|
| + sync_options_2_.Equals(*(*callback_registrations_)[0]->options());
|
| }
|
|
|
| TEST_F(BackgroundSyncManagerTest, GetRegistrationsBadBackend) {
|
| @@ -666,33 +669,20 @@ TEST_F(BackgroundSyncManagerTest, GetRegistrationsBadBackend) {
|
|
|
| TEST_F(BackgroundSyncManagerTest, Unregister) {
|
| EXPECT_TRUE(Register(sync_options_1_));
|
| - EXPECT_TRUE(Unregister(callback_registration_));
|
| + EXPECT_TRUE(Unregister(callback_registration_.get()));
|
| EXPECT_FALSE(GetRegistration(sync_options_1_));
|
| }
|
|
|
| -TEST_F(BackgroundSyncManagerTest, UnregisterWrongId) {
|
| - EXPECT_TRUE(Register(sync_options_1_));
|
| - callback_registration_.set_id(callback_registration_.id() + 1);
|
| - EXPECT_FALSE(Unregister(callback_registration_));
|
| -}
|
| -
|
| TEST_F(BackgroundSyncManagerTest, Reregister) {
|
| EXPECT_TRUE(Register(sync_options_1_));
|
| - EXPECT_TRUE(Unregister(callback_registration_));
|
| + EXPECT_TRUE(Unregister(callback_registration_.get()));
|
| EXPECT_TRUE(Register(sync_options_1_));
|
| }
|
|
|
| -TEST_F(BackgroundSyncManagerTest, UnregisterNonExisting) {
|
| - BackgroundSyncRegistration nonexistant_registration;
|
| - nonexistant_registration.set_id(1);
|
| - EXPECT_FALSE(Unregister(nonexistant_registration));
|
| - EXPECT_EQ(BACKGROUND_SYNC_STATUS_NOT_FOUND, callback_status_);
|
| -}
|
| -
|
| TEST_F(BackgroundSyncManagerTest, UnregisterSecond) {
|
| EXPECT_TRUE(Register(sync_options_1_));
|
| EXPECT_TRUE(Register(sync_options_2_));
|
| - EXPECT_TRUE(Unregister(callback_registration_));
|
| + EXPECT_TRUE(Unregister(callback_registration_.get()));
|
| EXPECT_TRUE(GetRegistration(sync_options_1_));
|
| EXPECT_TRUE(Register(sync_options_2_));
|
| }
|
| @@ -702,7 +692,7 @@ TEST_F(BackgroundSyncManagerTest, UnregisterBadBackend) {
|
| EXPECT_TRUE(Register(sync_options_1_));
|
| EXPECT_TRUE(Register(sync_options_2_));
|
| test_background_sync_manager_->set_corrupt_backend(true);
|
| - EXPECT_FALSE(Unregister(callback_registration_));
|
| + EXPECT_FALSE(Unregister(callback_registration_.get()));
|
| // Unregister should have discovered the bad backend and disabled the
|
| // BackgroundSyncManager.
|
| test_background_sync_manager_->set_corrupt_backend(false);
|
| @@ -712,18 +702,19 @@ TEST_F(BackgroundSyncManagerTest, UnregisterBadBackend) {
|
|
|
| TEST_F(BackgroundSyncManagerTest, RegistrationIncreasesId) {
|
| EXPECT_TRUE(Register(sync_options_1_));
|
| - BackgroundSyncRegistration registered_sync = callback_registration_;
|
| + scoped_ptr<BackgroundSyncRegistrationHandle> registered_sync =
|
| + callback_registration_.Pass();
|
| BackgroundSyncRegistration::RegistrationId cur_id =
|
| - callback_registration_.id();
|
| + registered_sync->handle_id();
|
|
|
| EXPECT_TRUE(GetRegistration(sync_options_1_));
|
| EXPECT_TRUE(Register(sync_options_2_));
|
| - EXPECT_LT(cur_id, callback_registration_.id());
|
| - cur_id = callback_registration_.id();
|
| + EXPECT_LT(cur_id, callback_registration_->handle_id());
|
| + cur_id = callback_registration_->handle_id();
|
|
|
| - EXPECT_TRUE(Unregister(registered_sync));
|
| + EXPECT_TRUE(Unregister(registered_sync.get()));
|
| EXPECT_TRUE(Register(sync_options_1_));
|
| - EXPECT_LT(cur_id, callback_registration_.id());
|
| + EXPECT_LT(cur_id, callback_registration_->handle_id());
|
| }
|
|
|
| TEST_F(BackgroundSyncManagerTest, RebootRecovery) {
|
| @@ -775,20 +766,12 @@ TEST_F(BackgroundSyncManagerTest, SequentialOperations) {
|
| // the operations complete sequentially.
|
| SetupDelayedBackgroundSyncManager();
|
|
|
| - const int64 kExpectedInitialId = BackgroundSyncRegistration::kInitialId;
|
| -
|
| bool register_called = false;
|
| - bool unregister_called = false;
|
| bool get_registration_called = false;
|
| test_background_sync_manager_->Register(
|
| sw_registration_id_1_, sync_options_1_,
|
| base::Bind(&BackgroundSyncManagerTest::StatusAndRegistrationCallback,
|
| base::Unretained(this), ®ister_called));
|
| - test_background_sync_manager_->Unregister(
|
| - sw_registration_id_1_, sync_options_1_.tag, sync_options_1_.periodicity,
|
| - kExpectedInitialId,
|
| - base::Bind(&BackgroundSyncManagerTest::StatusCallback,
|
| - base::Unretained(this), &unregister_called));
|
| test_background_sync_manager_->GetRegistration(
|
| sw_registration_id_1_, sync_options_1_.tag, sync_options_1_.periodicity,
|
| base::Bind(&BackgroundSyncManagerTest::StatusAndRegistrationCallback,
|
| @@ -797,31 +780,19 @@ TEST_F(BackgroundSyncManagerTest, SequentialOperations) {
|
| base::RunLoop().RunUntilIdle();
|
| // Init should be blocked while loading from the backend.
|
| EXPECT_FALSE(register_called);
|
| - EXPECT_FALSE(unregister_called);
|
| EXPECT_FALSE(get_registration_called);
|
|
|
| test_background_sync_manager_->Continue();
|
| base::RunLoop().RunUntilIdle();
|
| // Register should be blocked while storing to the backend.
|
| EXPECT_FALSE(register_called);
|
| - EXPECT_FALSE(unregister_called);
|
| EXPECT_FALSE(get_registration_called);
|
|
|
| test_background_sync_manager_->Continue();
|
| base::RunLoop().RunUntilIdle();
|
| EXPECT_TRUE(register_called);
|
| - EXPECT_EQ(kExpectedInitialId, callback_registration_.id());
|
| EXPECT_EQ(BACKGROUND_SYNC_STATUS_OK, callback_status_);
|
| - // Unregister should be blocked while storing to the backend.
|
| - EXPECT_FALSE(unregister_called);
|
| - EXPECT_FALSE(get_registration_called);
|
| -
|
| - test_background_sync_manager_->Continue();
|
| - base::RunLoop().RunUntilIdle();
|
| - // Unregister should be done and since GetRegistration doesn't require the
|
| - // backend it should be done too.
|
| - EXPECT_EQ(BACKGROUND_SYNC_STATUS_NOT_FOUND, callback_status_);
|
| - EXPECT_TRUE(unregister_called);
|
| + // GetRegistration should run immediately as it doesn't write to disk.
|
| EXPECT_TRUE(get_registration_called);
|
| }
|
|
|
| @@ -969,15 +940,15 @@ TEST_F(BackgroundSyncManagerTest, StoreAndRetrievePreservesValues) {
|
| SetupBackgroundSyncManager();
|
|
|
| EXPECT_TRUE(GetRegistration(options));
|
| - EXPECT_TRUE(options.Equals(*callback_registration_.options()));
|
| + EXPECT_TRUE(options.Equals(*callback_registration_->options()));
|
| }
|
|
|
| TEST_F(BackgroundSyncManagerTest, EmptyTagSupported) {
|
| sync_options_1_.tag = "a";
|
| EXPECT_TRUE(Register(sync_options_1_));
|
| EXPECT_TRUE(GetRegistration(sync_options_1_));
|
| - EXPECT_TRUE(sync_options_1_.Equals(*callback_registration_.options()));
|
| - EXPECT_TRUE(Unregister(callback_registration_));
|
| + EXPECT_TRUE(sync_options_1_.Equals(*callback_registration_->options()));
|
| + EXPECT_TRUE(Unregister(callback_registration_.get()));
|
| EXPECT_FALSE(GetRegistration(sync_options_1_));
|
| }
|
|
|
| @@ -993,17 +964,17 @@ TEST_F(BackgroundSyncManagerTest, OverlappingPeriodicAndOneShotTags) {
|
| EXPECT_TRUE(Register(sync_options_2_));
|
|
|
| EXPECT_TRUE(GetRegistration(sync_options_1_));
|
| - EXPECT_EQ(SYNC_PERIODIC, callback_registration_.options()->periodicity);
|
| + EXPECT_EQ(SYNC_PERIODIC, callback_registration_->options()->periodicity);
|
| EXPECT_TRUE(GetRegistration(sync_options_2_));
|
| - EXPECT_EQ(SYNC_ONE_SHOT, callback_registration_.options()->periodicity);
|
| + EXPECT_EQ(SYNC_ONE_SHOT, callback_registration_->options()->periodicity);
|
|
|
| EXPECT_TRUE(GetRegistration(sync_options_1_));
|
| - EXPECT_TRUE(Unregister(callback_registration_));
|
| + EXPECT_TRUE(Unregister(callback_registration_.get()));
|
| EXPECT_FALSE(GetRegistration(sync_options_1_));
|
| EXPECT_TRUE(GetRegistration(sync_options_2_));
|
| - EXPECT_EQ(SYNC_ONE_SHOT, callback_registration_.options()->periodicity);
|
| + EXPECT_EQ(SYNC_ONE_SHOT, callback_registration_->options()->periodicity);
|
|
|
| - EXPECT_TRUE(Unregister(callback_registration_));
|
| + EXPECT_TRUE(Unregister(callback_registration_.get()));
|
| EXPECT_FALSE(GetRegistration(sync_options_2_));
|
| }
|
|
|
| @@ -1126,14 +1097,12 @@ TEST_F(BackgroundSyncManagerTest, FailedOneShotReregisteredAndFires) {
|
| EXPECT_TRUE(Register(sync_options_1_));
|
| EXPECT_EQ(1, sync_events_called_);
|
| EXPECT_TRUE(GetRegistration(sync_options_1_));
|
| - BackgroundSyncRegistration first_registration = callback_registration_;
|
|
|
| InitSyncEventTest();
|
|
|
| // Reregistering should cause the sync event to fire again, this time
|
| // succeeding.
|
| EXPECT_TRUE(Register(sync_options_1_));
|
| - EXPECT_EQ(first_registration.id(), callback_registration_.id());
|
| EXPECT_EQ(2, sync_events_called_);
|
| EXPECT_FALSE(GetRegistration(sync_options_1_));
|
| }
|
| @@ -1207,7 +1176,7 @@ TEST_F(BackgroundSyncManagerTest, UnregisterOneShotMidSync) {
|
|
|
| RegisterAndVerifySyncEventDelayed(sync_options_1_);
|
|
|
| - EXPECT_TRUE(Unregister(callback_registration_));
|
| + EXPECT_TRUE(Unregister(callback_registration_.get()));
|
| EXPECT_FALSE(GetRegistration(sync_options_1_));
|
|
|
| sync_fired_callback_.Run(SERVICE_WORKER_OK);
|
| @@ -1272,7 +1241,7 @@ TEST_F(BackgroundSyncManagerTest, RegisterExistingFailsWithoutWindow) {
|
| TEST_F(BackgroundSyncManagerTest, UnregisterSucceedsWithoutWindow) {
|
| EXPECT_TRUE(Register(sync_options_1_));
|
| RemoveWindowClients();
|
| - EXPECT_TRUE(Unregister(callback_registration_));
|
| + EXPECT_TRUE(Unregister(callback_registration_.get()));
|
| EXPECT_FALSE(GetRegistration(sync_options_1_));
|
| }
|
|
|
|
|