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

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

Issue 400073003: Finish decoupling sync and invalidations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix GN 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 InvalidationService should 5 // This class defines tests that implementations of InvalidationService should
6 // pass in order to be conformant. Here's how you use it to test your 6 // pass in order to be conformant. Here's how you use it to test your
7 // implementation. 7 // implementation.
8 // 8 //
9 // Say your class is called MyInvalidationService. Then you need to define a 9 // Say your class is called MyInvalidationService. Then you need to define a
10 // class called MyInvalidationServiceTestDelegate in 10 // class called MyInvalidationServiceTestDelegate in
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // InvalidationServiceTest, 66 // InvalidationServiceTest,
67 // MyInvalidatorTestDelegate); 67 // MyInvalidatorTestDelegate);
68 // 68 //
69 // Easy! 69 // Easy!
70 70
71 #ifndef COMPONENTS_INVALIDATION_INVALIDATION_SERVICE_TEST_TEMPLATE_H_ 71 #ifndef COMPONENTS_INVALIDATION_INVALIDATION_SERVICE_TEST_TEMPLATE_H_
72 #define COMPONENTS_INVALIDATION_INVALIDATION_SERVICE_TEST_TEMPLATE_H_ 72 #define COMPONENTS_INVALIDATION_INVALIDATION_SERVICE_TEST_TEMPLATE_H_
73 73
74 #include "base/basictypes.h" 74 #include "base/basictypes.h"
75 #include "base/compiler_specific.h" 75 #include "base/compiler_specific.h"
76 #include "components/invalidation/ack_handle.h"
76 #include "components/invalidation/fake_invalidation_handler.h" 77 #include "components/invalidation/fake_invalidation_handler.h"
78 #include "components/invalidation/invalidation.h"
77 #include "components/invalidation/invalidation_service.h" 79 #include "components/invalidation/invalidation_service.h"
78 #include "components/invalidation/object_id_invalidation_map.h" 80 #include "components/invalidation/object_id_invalidation_map.h"
79 #include "components/invalidation/object_id_invalidation_map_test_util.h" 81 #include "components/invalidation/object_id_invalidation_map_test_util.h"
80 #include "google/cacheinvalidation/include/types.h" 82 #include "google/cacheinvalidation/include/types.h"
81 #include "google/cacheinvalidation/types.pb.h" 83 #include "google/cacheinvalidation/types.pb.h"
82 #include "sync/internal_api/public/base/ack_handle.h"
83 #include "sync/internal_api/public/base/invalidation.h"
84 #include "testing/gtest/include/gtest/gtest.h" 84 #include "testing/gtest/include/gtest/gtest.h"
85 85
86 template <typename InvalidatorTestDelegate> 86 template <typename InvalidatorTestDelegate>
87 class InvalidationServiceTest : public testing::Test { 87 class InvalidationServiceTest : public testing::Test {
88 protected: 88 protected:
89 InvalidationServiceTest() 89 InvalidationServiceTest()
90 : id1(ipc::invalidation::ObjectSource::CHROME_SYNC, "BOOKMARK"), 90 : id1(ipc::invalidation::ObjectSource::CHROME_SYNC, "BOOKMARK"),
91 id2(ipc::invalidation::ObjectSource::CHROME_SYNC, "PREFERENCE"), 91 id2(ipc::invalidation::ObjectSource::CHROME_SYNC, "PREFERENCE"),
92 id3(ipc::invalidation::ObjectSource::CHROME_SYNC, "AUTOFILL"), 92 id3(ipc::invalidation::ObjectSource::CHROME_SYNC, "AUTOFILL"),
93 id4(ipc::invalidation::ObjectSource::CHROME_PUSH_MESSAGING, 93 id4(ipc::invalidation::ObjectSource::CHROME_PUSH_MESSAGING,
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 handler.GetLastRetrievedState()); 379 handler.GetLastRetrievedState());
380 380
381 invalidator->UnregisterInvalidationHandler(&handler); 381 invalidator->UnregisterInvalidationHandler(&handler);
382 } 382 }
383 383
384 REGISTER_TYPED_TEST_CASE_P(InvalidationServiceTest, 384 REGISTER_TYPED_TEST_CASE_P(InvalidationServiceTest,
385 Basic, MultipleHandlers, EmptySetUnregisters, 385 Basic, MultipleHandlers, EmptySetUnregisters,
386 GetInvalidatorStateAlwaysCurrent); 386 GetInvalidatorStateAlwaysCurrent);
387 387
388 #endif // COMPONENTS_INVALIDATION_INVALIDATION_SERVICE_TEST_TEMPLATE_H_ 388 #endif // COMPONENTS_INVALIDATION_INVALIDATION_SERVICE_TEST_TEMPLATE_H_
OLDNEW
« no previous file with comments | « components/invalidation/invalidation_service.h ('k') | components/invalidation/invalidation_state_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698