Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: components/invalidation/invalidator_test_template.h

Issue 387733004: Move sync/notifier to components/invalidation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: (GN) Comment out dependency on internal target Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // 74 //
75 // Easy! 75 // Easy!
76 76
77 #ifndef COMPONENTS_INVALIDATION_INVALIDATOR_TEST_TEMPLATE_H_ 77 #ifndef COMPONENTS_INVALIDATION_INVALIDATOR_TEST_TEMPLATE_H_
78 #define COMPONENTS_INVALIDATION_INVALIDATOR_TEST_TEMPLATE_H_ 78 #define COMPONENTS_INVALIDATION_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 "components/invalidation/fake_invalidation_handler.h" 82 #include "components/invalidation/fake_invalidation_handler.h"
83 #include "components/invalidation/fake_invalidation_state_tracker.h" 83 #include "components/invalidation/fake_invalidation_state_tracker.h"
84 #include "components/invalidation/invalidator.h"
85 #include "components/invalidation/object_id_invalidation_map_test_util.h"
84 #include "google/cacheinvalidation/include/types.h" 86 #include "google/cacheinvalidation/include/types.h"
85 #include "google/cacheinvalidation/types.pb.h" 87 #include "google/cacheinvalidation/types.pb.h"
86 #include "sync/internal_api/public/base/object_id_invalidation_map_test_util.h"
87 #include "sync/notifier/invalidator.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
92 template <typename InvalidatorTestDelegate> 92 template <typename InvalidatorTestDelegate>
93 class InvalidatorTest : public testing::Test { 93 class InvalidatorTest : public testing::Test {
94 protected: 94 protected:
95 InvalidatorTest() 95 InvalidatorTest()
96 : id1(ipc::invalidation::ObjectSource::TEST, "a"), 96 : id1(ipc::invalidation::ObjectSource::TEST, "a"),
97 id2(ipc::invalidation::ObjectSource::TEST, "b"), 97 id2(ipc::invalidation::ObjectSource::TEST, "b"),
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 invalidator->UnregisterHandler(&handler); 368 invalidator->UnregisterHandler(&handler);
369 } 369 }
370 370
371 REGISTER_TYPED_TEST_CASE_P(InvalidatorTest, 371 REGISTER_TYPED_TEST_CASE_P(InvalidatorTest,
372 Basic, MultipleHandlers, EmptySetUnregisters, 372 Basic, MultipleHandlers, EmptySetUnregisters,
373 GetInvalidatorStateAlwaysCurrent); 373 GetInvalidatorStateAlwaysCurrent);
374 374
375 } // namespace syncer 375 } // namespace syncer
376 376
377 #endif // COMPONENTS_INVALIDATION_INVALIDATOR_TEST_TEMPLATE_H_ 377 #endif // COMPONENTS_INVALIDATION_INVALIDATOR_TEST_TEMPLATE_H_
OLDNEW
« no previous file with comments | « components/invalidation/invalidator_storage.cc ('k') | components/invalidation/mock_ack_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698