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

Side by Side Diff: sync/notifier/invalidator_factory_unittest.cc

Issue 14113050: sync: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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 (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 #include "sync/notifier/invalidator_factory.h" 5 #include "sync/notifier/invalidator_factory.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 19 matching lines...) Expand all
30 notifier_options_.request_context_getter = 30 notifier_options_.request_context_getter =
31 new net::TestURLRequestContextGetter( 31 new net::TestURLRequestContextGetter(
32 message_loop_.message_loop_proxy()); 32 message_loop_.message_loop_proxy());
33 } 33 }
34 34
35 virtual void TearDown() OVERRIDE { 35 virtual void TearDown() OVERRIDE {
36 message_loop_.RunUntilIdle(); 36 message_loop_.RunUntilIdle();
37 EXPECT_EQ(0, fake_handler_.GetInvalidationCount()); 37 EXPECT_EQ(0, fake_handler_.GetInvalidationCount());
38 } 38 }
39 39
40 MessageLoop message_loop_; 40 base::MessageLoop message_loop_;
41 FakeInvalidationHandler fake_handler_; 41 FakeInvalidationHandler fake_handler_;
42 notifier::NotifierOptions notifier_options_; 42 notifier::NotifierOptions notifier_options_;
43 scoped_ptr<InvalidatorFactory> factory_; 43 scoped_ptr<InvalidatorFactory> factory_;
44 }; 44 };
45 45
46 // Test basic creation of a NonBlockingInvalidationNotifier. 46 // Test basic creation of a NonBlockingInvalidationNotifier.
47 TEST_F(InvalidatorFactoryTest, Basic) { 47 TEST_F(InvalidatorFactoryTest, Basic) {
48 notifier_options_.notification_method = notifier::NOTIFICATION_SERVER; 48 notifier_options_.notification_method = notifier::NOTIFICATION_SERVER;
49 InvalidatorFactory factory( 49 InvalidatorFactory factory(
50 notifier_options_, 50 notifier_options_,
(...skipping 25 matching lines...) Expand all
76 ASSERT_TRUE(invalidator.get()); 76 ASSERT_TRUE(invalidator.get());
77 ObjectIdSet ids = ModelTypeSetToObjectIdSet(ModelTypeSet(syncer::BOOKMARKS)); 77 ObjectIdSet ids = ModelTypeSetToObjectIdSet(ModelTypeSet(syncer::BOOKMARKS));
78 invalidator->RegisterHandler(&fake_handler_); 78 invalidator->RegisterHandler(&fake_handler_);
79 invalidator->UpdateRegisteredIds(&fake_handler_, ids); 79 invalidator->UpdateRegisteredIds(&fake_handler_, ids);
80 invalidator->UnregisterHandler(&fake_handler_); 80 invalidator->UnregisterHandler(&fake_handler_);
81 #endif 81 #endif
82 } 82 }
83 83
84 } // namespace 84 } // namespace
85 } // namespace syncer 85 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/notifier/invalidation_notifier_unittest.cc ('k') | sync/notifier/non_blocking_invalidator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698