Index: components/invalidation/invalidator_registrar_unittest.cc |
diff --git a/components/invalidation/invalidator_registrar_unittest.cc b/components/invalidation/invalidator_registrar_unittest.cc |
index 729415c4da26eb888790eaca414bfae4782c5adb..68863826f251d465d7e761fe7bcc47070e606429 100644 |
--- a/components/invalidation/invalidator_registrar_unittest.cc |
+++ b/components/invalidation/invalidator_registrar_unittest.cc |
@@ -33,9 +33,9 @@ class RegistrarInvalidator : public Invalidator { |
registrar_.RegisterHandler(handler); |
} |
- void UpdateRegisteredIds(InvalidationHandler* handler, |
+ bool UpdateRegisteredIds(InvalidationHandler* handler, |
const ObjectIdSet& ids) override { |
- registrar_.UpdateRegisteredIds(handler, ids); |
+ return registrar_.UpdateRegisteredIds(handler, ids); |
} |
void UnregisterHandler(InvalidationHandler* handler) override { |
@@ -109,43 +109,6 @@ INSTANTIATE_TYPED_TEST_CASE_P( |
RegistrarInvalidatorTest, InvalidatorTest, |
RegistrarInvalidatorTestDelegate); |
-class InvalidatorRegistrarTest : public testing::Test {}; |
- |
-// Technically the test below can be part of InvalidatorTest, but we |
-// want to keep the number of death tests down. |
- |
-// When we expect a death via CHECK(), we can't match against the |
-// CHECK() message since they are removed in official builds. |
- |
-#if GTEST_HAS_DEATH_TEST |
- |
-// Multiple registrations by different handlers on the same object ID should |
-// cause a CHECK. |
-TEST_F(InvalidatorRegistrarTest, MultipleRegistration) { |
- const invalidation::ObjectId id1(ipc::invalidation::ObjectSource::TEST, "a"); |
- const invalidation::ObjectId id2(ipc::invalidation::ObjectSource::TEST, "a"); |
- |
- InvalidatorRegistrar registrar; |
- |
- FakeInvalidationHandler handler1; |
- registrar.RegisterHandler(&handler1); |
- |
- FakeInvalidationHandler handler2; |
- registrar.RegisterHandler(&handler2); |
- |
- ObjectIdSet ids; |
- ids.insert(id1); |
- ids.insert(id2); |
- registrar.UpdateRegisteredIds(&handler1, ids); |
- |
- registrar.DetachFromThreadForTest(); |
- EXPECT_DEATH({ registrar.UpdateRegisteredIds(&handler2, ids); }, ""); |
- |
- registrar.UnregisterHandler(&handler2); |
- registrar.UnregisterHandler(&handler1); |
-} |
-#endif // GTEST_HAS_DEATH_TEST |
- |
} // namespace |
} // namespace syncer |