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

Unified Diff: sync/internal_api/sync_context_proxy_impl_unittest.cc

Issue 375023002: sync: Support nudges from non-blocking sync types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: SYNC_EXPORT 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 side-by-side diff with in-line comments
Download patch
Index: sync/internal_api/sync_context_proxy_impl_unittest.cc
diff --git a/sync/internal_api/sync_context_proxy_impl_unittest.cc b/sync/internal_api/sync_context_proxy_impl_unittest.cc
index 18f5bbfea5b6352afdd912f7b5b4dbfea252e624..1281e18d905cc4adceba060615309efc714f0261 100644
--- a/sync/internal_api/sync_context_proxy_impl_unittest.cc
+++ b/sync/internal_api/sync_context_proxy_impl_unittest.cc
@@ -11,6 +11,7 @@
#include "sync/internal_api/public/sync_context.h"
#include "sync/internal_api/sync_context_proxy_impl.h"
#include "sync/sessions/model_type_registry.h"
+#include "sync/test/engine/mock_nudge_handler.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace syncer {
@@ -20,7 +21,7 @@ class SyncContextProxyImplTest : public ::testing::Test {
SyncContextProxyImplTest()
: sync_task_runner_(base::MessageLoopProxy::current()),
type_task_runner_(base::MessageLoopProxy::current()),
- registry_(new ModelTypeRegistry()),
+ registry_(new ModelTypeRegistry(workers_, NULL, &nudge_handler_)),
stanisc 2014/07/09 22:35:25 Consider adding a comment explaining what this NUL
rlarocque 2014/07/10 00:12:29 It's probably better to just use a real directory.
context_proxy_(sync_task_runner_, registry_->AsWeakPtr()) {}
// The sync thread could be shut down at any time without warning. This
@@ -33,7 +34,11 @@ class SyncContextProxyImplTest : public ::testing::Test {
base::MessageLoop loop_;
scoped_refptr<base::SequencedTaskRunner> sync_task_runner_;
scoped_refptr<base::SequencedTaskRunner> type_task_runner_;
+
+ std::vector<scoped_refptr<ModelSafeWorker> > workers_;
+ MockNudgeHandler nudge_handler_;
scoped_ptr<ModelTypeRegistry> registry_;
+
SyncContextProxyImpl context_proxy_;
};

Powered by Google App Engine
This is Rietveld 408576698