| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This class defines tests that implementations of Invalidator should pass in | 5 // This class defines tests that implementations of Invalidator should pass in |
| 6 // order to be conformant. Here's how you use it to test your implementation. | 6 // order to be conformant. Here's how you use it to test your implementation. |
| 7 // | 7 // |
| 8 // Say your class is called MyInvalidator. Then you need to define a class | 8 // Say your class is called MyInvalidator. Then you need to define a class |
| 9 // called MyInvalidatorTestDelegate in my_sync_notifier_unittest.cc like this: | 9 // called MyInvalidatorTestDelegate in my_sync_notifier_unittest.cc like this: |
| 10 // | 10 // |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 // following statement to my_sync_notifier_unittest.cc: | 70 // following statement to my_sync_notifier_unittest.cc: |
| 71 // | 71 // |
| 72 // INSTANTIATE_TYPED_TEST_CASE_P( | 72 // INSTANTIATE_TYPED_TEST_CASE_P( |
| 73 // MyInvalidator, InvalidatorTest, MyInvalidatorTestDelegate); | 73 // MyInvalidator, InvalidatorTest, MyInvalidatorTestDelegate); |
| 74 // | 74 // |
| 75 // Easy! | 75 // Easy! |
| 76 | 76 |
| 77 #ifndef COMPONENTS_INVALIDATION_IMPL_INVALIDATOR_TEST_TEMPLATE_H_ | 77 #ifndef COMPONENTS_INVALIDATION_IMPL_INVALIDATOR_TEST_TEMPLATE_H_ |
| 78 #define COMPONENTS_INVALIDATION_IMPL_INVALIDATOR_TEST_TEMPLATE_H_ | 78 #define COMPONENTS_INVALIDATION_IMPL_INVALIDATOR_TEST_TEMPLATE_H_ |
| 79 | 79 |
| 80 #include "base/basictypes.h" | |
| 81 #include "base/compiler_specific.h" | 80 #include "base/compiler_specific.h" |
| 81 #include "base/macros.h" |
| 82 #include "components/invalidation/impl/fake_invalidation_handler.h" | 82 #include "components/invalidation/impl/fake_invalidation_handler.h" |
| 83 #include "components/invalidation/impl/fake_invalidation_state_tracker.h" | 83 #include "components/invalidation/impl/fake_invalidation_state_tracker.h" |
| 84 #include "components/invalidation/impl/invalidator.h" | 84 #include "components/invalidation/impl/invalidator.h" |
| 85 #include "components/invalidation/impl/object_id_invalidation_map_test_util.h" | 85 #include "components/invalidation/impl/object_id_invalidation_map_test_util.h" |
| 86 #include "google/cacheinvalidation/include/types.h" | 86 #include "google/cacheinvalidation/include/types.h" |
| 87 #include "google/cacheinvalidation/types.pb.h" | 87 #include "google/cacheinvalidation/types.pb.h" |
| 88 #include "testing/gtest/include/gtest/gtest.h" | 88 #include "testing/gtest/include/gtest/gtest.h" |
| 89 | 89 |
| 90 namespace syncer { | 90 namespace syncer { |
| 91 | 91 |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 REGISTER_TYPED_TEST_CASE_P(InvalidatorTest, | 393 REGISTER_TYPED_TEST_CASE_P(InvalidatorTest, |
| 394 Basic, | 394 Basic, |
| 395 MultipleHandlers, | 395 MultipleHandlers, |
| 396 MultipleRegistrations, | 396 MultipleRegistrations, |
| 397 EmptySetUnregisters, | 397 EmptySetUnregisters, |
| 398 GetInvalidatorStateAlwaysCurrent); | 398 GetInvalidatorStateAlwaysCurrent); |
| 399 | 399 |
| 400 } // namespace syncer | 400 } // namespace syncer |
| 401 | 401 |
| 402 #endif // COMPONENTS_INVALIDATION_IMPL_INVALIDATOR_TEST_TEMPLATE_H_ | 402 #endif // COMPONENTS_INVALIDATION_IMPL_INVALIDATOR_TEST_TEMPLATE_H_ |
| OLD | NEW |