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

Side by Side Diff: chrome/browser/sync/notifier/chrome_invalidation_client_unittest.cc

Issue 8568041: [Sync] Add type conversion constructor for WeakHandle (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean up tests a bit Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <string> 5 #include <string>
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "chrome/browser/sync/notifier/chrome_invalidation_client.h" 8 #include "chrome/browser/sync/notifier/chrome_invalidation_client.h"
9 #include "chrome/browser/sync/notifier/state_writer.h" 9 #include "chrome/browser/sync/notifier/state_writer.h"
10 #include "chrome/browser/sync/syncable/model_type.h" 10 #include "chrome/browser/sync/syncable/model_type.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 68 }
69 }; 69 };
70 70
71 } // namespace 71 } // namespace
72 72
73 class ChromeInvalidationClientTest : public testing::Test { 73 class ChromeInvalidationClientTest : public testing::Test {
74 protected: 74 protected:
75 virtual void SetUp() { 75 virtual void SetUp() {
76 client_.Start(kClientId, kClientInfo, kState, 76 client_.Start(kClientId, kClientInfo, kState,
77 InvalidationVersionMap(), 77 InvalidationVersionMap(),
78 browser_sync::WeakHandle<InvalidationVersionTracker>( 78 browser_sync::MakeWeakHandle(
79 mock_invalidation_version_tracker_.AsWeakPtr()), 79 mock_invalidation_version_tracker_.AsWeakPtr()),
80 &mock_listener_, &mock_state_writer_, 80 &mock_listener_, &mock_state_writer_,
81 fake_base_task_.AsWeakPtr()); 81 fake_base_task_.AsWeakPtr());
82 } 82 }
83 83
84 virtual void TearDown() { 84 virtual void TearDown() {
85 client_.Stop(); 85 client_.Stop();
86 message_loop_.RunAllPending(); 86 message_loop_.RunAllPending();
87 } 87 }
88 88
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 // Registered types should be preserved across Stop/Start. 283 // Registered types should be preserved across Stop/Start.
284 TearDown(); 284 TearDown();
285 SetUp(); 285 SetUp();
286 EXPECT_CALL(mock_listener_, OnInvalidate(MakeMapFromSet(types, ""))); 286 EXPECT_CALL(mock_listener_, OnInvalidate(MakeMapFromSet(types, "")));
287 FireInvalidateAll(); 287 FireInvalidateAll();
288 } 288 }
289 289
290 // TODO(akalin): Flesh out unit tests. 290 // TODO(akalin): Flesh out unit tests.
291 291
292 } // namespace sync_notifier 292 } // namespace sync_notifier
OLDNEW
« no previous file with comments | « chrome/browser/sync/js/js_test_util.cc ('k') | chrome/browser/sync/notifier/non_blocking_invalidation_notifier_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698