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

Side by Side Diff: components/sync/core_impl/js_sync_manager_observer_unittest.cc

Issue 2388673002: Revert of [Sync] Move //components/sync to the syncer namespace. (patchset #5 id:40001 of https://co (Closed)
Patch Set: Created 4 years, 2 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
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 "components/sync/core_impl/js_sync_manager_observer.h" 5 #include "components/sync/core_impl/js_sync_manager_observer.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 28 matching lines...) Expand all
39 39
40 protected: 40 protected:
41 StrictMock<MockJsEventHandler> mock_js_event_handler_; 41 StrictMock<MockJsEventHandler> mock_js_event_handler_;
42 JsSyncManagerObserver js_sync_manager_observer_; 42 JsSyncManagerObserver js_sync_manager_observer_;
43 43
44 void PumpLoop() { base::RunLoop().RunUntilIdle(); } 44 void PumpLoop() { base::RunLoop().RunUntilIdle(); }
45 }; 45 };
46 46
47 TEST_F(JsSyncManagerObserverTest, OnInitializationComplete) { 47 TEST_F(JsSyncManagerObserverTest, OnInitializationComplete) {
48 base::DictionaryValue expected_details; 48 base::DictionaryValue expected_details;
49 ModelTypeSet restored_types; 49 syncer::ModelTypeSet restored_types;
50 restored_types.Put(BOOKMARKS); 50 restored_types.Put(BOOKMARKS);
51 restored_types.Put(NIGORI); 51 restored_types.Put(NIGORI);
52 expected_details.Set("restoredTypes", ModelTypeSetToValue(restored_types)); 52 expected_details.Set("restoredTypes", ModelTypeSetToValue(restored_types));
53 53
54 EXPECT_CALL(mock_js_event_handler_, 54 EXPECT_CALL(mock_js_event_handler_,
55 HandleJsEvent("onInitializationComplete", 55 HandleJsEvent("onInitializationComplete",
56 HasDetailsAsDictionary(expected_details))); 56 HasDetailsAsDictionary(expected_details)));
57 57
58 js_sync_manager_observer_.OnInitializationComplete( 58 js_sync_manager_observer_.OnInitializationComplete(
59 WeakHandle<JsBackend>(), WeakHandle<DataTypeDebugInfoListener>(), true, 59 WeakHandle<JsBackend>(), WeakHandle<DataTypeDebugInfoListener>(), true,
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 EXPECT_CALL(mock_js_event_handler_, 102 EXPECT_CALL(mock_js_event_handler_,
103 HandleJsEvent("onConnectionStatusChange", 103 HandleJsEvent("onConnectionStatusChange",
104 HasDetailsAsDictionary(expected_details))); 104 HasDetailsAsDictionary(expected_details)));
105 105
106 js_sync_manager_observer_.OnConnectionStatusChange(kStatus); 106 js_sync_manager_observer_.OnConnectionStatusChange(kStatus);
107 PumpLoop(); 107 PumpLoop();
108 } 108 }
109 109
110 } // namespace 110 } // namespace
111 } // namespace syncer 111 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/core_impl/js_sync_manager_observer.cc ('k') | components/sync/core_impl/model_type_connector_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698