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

Side by Side Diff: sync/internal_api/js_sync_manager_observer_unittest.cc

Issue 10584019: sync: Remove ClearUserData command. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 8 years, 6 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
« no previous file with comments | « sync/internal_api/js_sync_manager_observer.cc ('k') | sync/internal_api/public/sync_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/internal_api/js_sync_manager_observer.h" 5 #include "sync/internal_api/js_sync_manager_observer.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 TEST_F(JsSyncManagerObserverTest, NoArgNotifiations) { 46 TEST_F(JsSyncManagerObserverTest, NoArgNotifiations) {
47 InSequence dummy; 47 InSequence dummy;
48 48
49 EXPECT_CALL(mock_js_event_handler_, 49 EXPECT_CALL(mock_js_event_handler_,
50 HandleJsEvent("onInitializationComplete", 50 HandleJsEvent("onInitializationComplete",
51 HasDetails(JsEventDetails()))); 51 HasDetails(JsEventDetails())));
52 EXPECT_CALL(mock_js_event_handler_, 52 EXPECT_CALL(mock_js_event_handler_,
53 HandleJsEvent("onStopSyncingPermanently", 53 HandleJsEvent("onStopSyncingPermanently",
54 HasDetails(JsEventDetails()))); 54 HasDetails(JsEventDetails())));
55 EXPECT_CALL(mock_js_event_handler_, 55 EXPECT_CALL(mock_js_event_handler_,
56 HandleJsEvent("onClearServerDataSucceeded",
57 HasDetails(JsEventDetails())));
58 EXPECT_CALL(mock_js_event_handler_,
59 HandleJsEvent("onClearServerDataFailed",
60 HasDetails(JsEventDetails())));
61 EXPECT_CALL(mock_js_event_handler_,
62 HandleJsEvent("onEncryptionComplete", 56 HandleJsEvent("onEncryptionComplete",
63 HasDetails(JsEventDetails()))); 57 HasDetails(JsEventDetails())));
64 58
65 js_sync_manager_observer_.OnInitializationComplete(WeakHandle<JsBackend>(), 59 js_sync_manager_observer_.OnInitializationComplete(WeakHandle<JsBackend>(),
66 true); 60 true);
67 js_sync_manager_observer_.OnStopSyncingPermanently(); 61 js_sync_manager_observer_.OnStopSyncingPermanently();
68 js_sync_manager_observer_.OnClearServerDataSucceeded();
69 js_sync_manager_observer_.OnClearServerDataFailed();
70 js_sync_manager_observer_.OnEncryptionComplete(); 62 js_sync_manager_observer_.OnEncryptionComplete();
71 PumpLoop(); 63 PumpLoop();
72 } 64 }
73 65
74 TEST_F(JsSyncManagerObserverTest, OnSyncCycleCompleted) { 66 TEST_F(JsSyncManagerObserverTest, OnSyncCycleCompleted) {
75 syncable::ModelTypePayloadMap download_progress_markers; 67 syncable::ModelTypePayloadMap download_progress_markers;
76 sessions::SyncSessionSnapshot snapshot(sessions::SyncerStatus(), 68 sessions::SyncSessionSnapshot snapshot(sessions::SyncerStatus(),
77 sessions::ErrorCounters(), 69 sessions::ErrorCounters(),
78 100, 70 100,
79 false, 71 false,
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 HandleJsEvent("onEncryptedTypesChanged", 202 HandleJsEvent("onEncryptedTypesChanged",
211 HasDetailsAsDictionary(expected_details))); 203 HasDetailsAsDictionary(expected_details)));
212 204
213 js_sync_manager_observer_.OnEncryptedTypesChanged( 205 js_sync_manager_observer_.OnEncryptedTypesChanged(
214 encrypted_types, encrypt_everything); 206 encrypted_types, encrypt_everything);
215 PumpLoop(); 207 PumpLoop();
216 } 208 }
217 209
218 } // namespace 210 } // namespace
219 } // namespace browser_sync 211 } // namespace browser_sync
OLDNEW
« no previous file with comments | « sync/internal_api/js_sync_manager_observer.cc ('k') | sync/internal_api/public/sync_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698