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

Side by Side Diff: chrome/browser/sync/js_sync_manager_observer_unittest.cc

Issue 6874018: make new syncer thread the default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Send for CR. Created 9 years, 8 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) 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 "chrome/browser/sync/js_sync_manager_observer.h" 5 #include "chrome/browser/sync/js_sync_manager_observer.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 21 matching lines...) Expand all
32 32
33 TEST_F(JsSyncManagerObserverTest, NoArgNotifiations) { 33 TEST_F(JsSyncManagerObserverTest, NoArgNotifiations) {
34 InSequence dummy; 34 InSequence dummy;
35 35
36 EXPECT_CALL(mock_router_, 36 EXPECT_CALL(mock_router_,
37 RouteJsEvent("onInitializationComplete", 37 RouteJsEvent("onInitializationComplete",
38 HasArgs(JsArgList()), NULL)); 38 HasArgs(JsArgList()), NULL));
39 EXPECT_CALL(mock_router_, 39 EXPECT_CALL(mock_router_,
40 RouteJsEvent("onPassphraseFailed", 40 RouteJsEvent("onPassphraseFailed",
41 HasArgs(JsArgList()), NULL)); 41 HasArgs(JsArgList()), NULL));
42 EXPECT_CALL(mock_router_, 42
43 RouteJsEvent("onPaused",
44 HasArgs(JsArgList()), NULL));
45 EXPECT_CALL(mock_router_,
46 RouteJsEvent("onResumed",
47 HasArgs(JsArgList()), NULL));
48 EXPECT_CALL(mock_router_, 43 EXPECT_CALL(mock_router_,
49 RouteJsEvent("onStopSyncingPermanently", 44 RouteJsEvent("onStopSyncingPermanently",
50 HasArgs(JsArgList()), NULL)); 45 HasArgs(JsArgList()), NULL));
51 EXPECT_CALL(mock_router_, 46 EXPECT_CALL(mock_router_,
52 RouteJsEvent("onClearServerDataSucceeded", 47 RouteJsEvent("onClearServerDataSucceeded",
53 HasArgs(JsArgList()), NULL)); 48 HasArgs(JsArgList()), NULL));
54 EXPECT_CALL(mock_router_, 49 EXPECT_CALL(mock_router_,
55 RouteJsEvent("onClearServerDataFailed", 50 RouteJsEvent("onClearServerDataFailed",
56 HasArgs(JsArgList()), NULL)); 51 HasArgs(JsArgList()), NULL));
57 52
58 sync_manager_observer_.OnInitializationComplete(); 53 sync_manager_observer_.OnInitializationComplete();
59 sync_manager_observer_.OnPassphraseFailed(); 54 sync_manager_observer_.OnPassphraseFailed();
60 sync_manager_observer_.OnPaused();
61 sync_manager_observer_.OnResumed();
62 sync_manager_observer_.OnStopSyncingPermanently(); 55 sync_manager_observer_.OnStopSyncingPermanently();
63 sync_manager_observer_.OnClearServerDataSucceeded(); 56 sync_manager_observer_.OnClearServerDataSucceeded();
64 sync_manager_observer_.OnClearServerDataFailed(); 57 sync_manager_observer_.OnClearServerDataFailed();
65 } 58 }
66 59
67 TEST_F(JsSyncManagerObserverTest, OnChangesComplete) { 60 TEST_F(JsSyncManagerObserverTest, OnChangesComplete) {
68 InSequence dummy; 61 InSequence dummy;
69 62
70 for (int i = syncable::FIRST_REAL_MODEL_TYPE; 63 for (int i = syncable::FIRST_REAL_MODEL_TYPE;
71 i < syncable::MODEL_TYPE_COUNT; ++i) { 64 i < syncable::MODEL_TYPE_COUNT; ++i) {
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 sync_manager_observer_.OnChangesApplied(syncable::ModelTypeFromInt(i), 249 sync_manager_observer_.OnChangesApplied(syncable::ModelTypeFromInt(i),
257 &trans, &changes[i], 250 &trans, &changes[i],
258 syncable::MODEL_TYPE_COUNT - i); 251 syncable::MODEL_TYPE_COUNT - i);
259 } 252 }
260 253
261 test_user_share.TearDown(); 254 test_user_share.TearDown();
262 } 255 }
263 256
264 } // namespace 257 } // namespace
265 } // namespace browser_sync 258 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698