OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 // | 74 // |
75 // Easy! | 75 // Easy! |
76 | 76 |
77 #ifndef SYNC_NOTIFIER_INVALIDATOR_TEST_TEMPLATE_H_ | 77 #ifndef SYNC_NOTIFIER_INVALIDATOR_TEST_TEMPLATE_H_ |
78 #define SYNC_NOTIFIER_INVALIDATOR_TEST_TEMPLATE_H_ | 78 #define SYNC_NOTIFIER_INVALIDATOR_TEST_TEMPLATE_H_ |
79 | 79 |
80 #include "base/basictypes.h" | 80 #include "base/basictypes.h" |
81 #include "base/compiler_specific.h" | 81 #include "base/compiler_specific.h" |
82 #include "google/cacheinvalidation/include/types.h" | 82 #include "google/cacheinvalidation/include/types.h" |
83 #include "google/cacheinvalidation/types.pb.h" | 83 #include "google/cacheinvalidation/types.pb.h" |
84 #include "sync/internal_api/public/base/invalidation_test_util.h" | |
85 #include "sync/internal_api/public/base/object_id_invalidation_map_test_util.h" | 84 #include "sync/internal_api/public/base/object_id_invalidation_map_test_util.h" |
86 #include "sync/notifier/fake_invalidation_handler.h" | 85 #include "sync/notifier/fake_invalidation_handler.h" |
87 #include "sync/notifier/fake_invalidation_state_tracker.h" | 86 #include "sync/notifier/fake_invalidation_state_tracker.h" |
88 #include "sync/notifier/invalidator.h" | 87 #include "sync/notifier/invalidator.h" |
89 #include "testing/gtest/include/gtest/gtest.h" | 88 #include "testing/gtest/include/gtest/gtest.h" |
90 | 89 |
91 namespace syncer { | 90 namespace syncer { |
92 | 91 |
93 template <typename InvalidatorTestDelegate> | 92 template <typename InvalidatorTestDelegate> |
94 class InvalidatorTest : public testing::Test { | 93 class InvalidatorTest : public testing::Test { |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 invalidator->UnregisterHandler(&handler); | 368 invalidator->UnregisterHandler(&handler); |
370 } | 369 } |
371 | 370 |
372 REGISTER_TYPED_TEST_CASE_P(InvalidatorTest, | 371 REGISTER_TYPED_TEST_CASE_P(InvalidatorTest, |
373 Basic, MultipleHandlers, EmptySetUnregisters, | 372 Basic, MultipleHandlers, EmptySetUnregisters, |
374 GetInvalidatorStateAlwaysCurrent); | 373 GetInvalidatorStateAlwaysCurrent); |
375 | 374 |
376 } // namespace syncer | 375 } // namespace syncer |
377 | 376 |
378 #endif // SYNC_NOTIFIER_INVALIDATOR_TEST_TEMPLATE_H_ | 377 #endif // SYNC_NOTIFIER_INVALIDATOR_TEST_TEMPLATE_H_ |
OLD | NEW |