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

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

Issue 1132013004: [Sync] Refactoring polling to be reliable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Full patch Created 5 years, 7 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 "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/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 sessions::SyncSessionSnapshot snapshot( 67 sessions::SyncSessionSnapshot snapshot(
68 sessions::ModelNeutralState(), 68 sessions::ModelNeutralState(),
69 ProgressMarkerMap(), 69 ProgressMarkerMap(),
70 false, 70 false,
71 5, 71 5,
72 2, 72 2,
73 7, 73 7,
74 false, 74 false,
75 0, 75 0,
76 base::Time::Now(), 76 base::Time::Now(),
77 base::Time::Now(),
77 std::vector<int>(MODEL_TYPE_COUNT, 0), 78 std::vector<int>(MODEL_TYPE_COUNT, 0),
78 std::vector<int>(MODEL_TYPE_COUNT, 0), 79 std::vector<int>(MODEL_TYPE_COUNT, 0),
79 sync_pb::GetUpdatesCallerInfo::UNKNOWN); 80 sync_pb::GetUpdatesCallerInfo::UNKNOWN);
80 base::DictionaryValue expected_details; 81 base::DictionaryValue expected_details;
81 expected_details.Set("snapshot", snapshot.ToValue()); 82 expected_details.Set("snapshot", snapshot.ToValue());
82 83
83 EXPECT_CALL(mock_js_event_handler_, 84 EXPECT_CALL(mock_js_event_handler_,
84 HandleJsEvent("onSyncCycleCompleted", 85 HandleJsEvent("onSyncCycleCompleted",
85 HasDetailsAsDictionary(expected_details))); 86 HasDetailsAsDictionary(expected_details)));
86 87
(...skipping 26 matching lines...) Expand all
113 EXPECT_CALL(mock_js_event_handler_, 114 EXPECT_CALL(mock_js_event_handler_,
114 HandleJsEvent("onConnectionStatusChange", 115 HandleJsEvent("onConnectionStatusChange",
115 HasDetailsAsDictionary(expected_details))); 116 HasDetailsAsDictionary(expected_details)));
116 117
117 js_sync_manager_observer_.OnConnectionStatusChange(kStatus); 118 js_sync_manager_observer_.OnConnectionStatusChange(kStatus);
118 PumpLoop(); 119 PumpLoop();
119 } 120 }
120 121
121 } // namespace 122 } // namespace
122 } // namespace syncer 123 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/engine/syncer_unittest.cc ('k') | sync/internal_api/public/sessions/sync_session_snapshot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698