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

Unified Diff: chrome/browser/sync/js/js_sync_manager_observer_unittest.cc

Issue 8356026: [Sync] Cache encrypted types info in ProfileSyncService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments (retry) Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sync/js/js_sync_manager_observer.cc ('k') | chrome/browser/sync/profile_sync_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/js/js_sync_manager_observer_unittest.cc
diff --git a/chrome/browser/sync/js/js_sync_manager_observer_unittest.cc b/chrome/browser/sync/js/js_sync_manager_observer_unittest.cc
index aa1f0f1f282a13129705ac0cc393c73ea2bcfd67..1f581177463b6fbf494f9a344707a2aa995ec6c1 100644
--- a/chrome/browser/sync/js/js_sync_manager_observer_unittest.cc
+++ b/chrome/browser/sync/js/js_sync_manager_observer_unittest.cc
@@ -58,12 +58,16 @@ TEST_F(JsSyncManagerObserverTest, NoArgNotifiations) {
EXPECT_CALL(mock_js_event_handler_,
HandleJsEvent("onClearServerDataFailed",
HasDetails(JsEventDetails())));
+ EXPECT_CALL(mock_js_event_handler_,
+ HandleJsEvent("onEncryptionComplete",
+ HasDetails(JsEventDetails())));
js_sync_manager_observer_.OnInitializationComplete(WeakHandle<JsBackend>(),
true);
js_sync_manager_observer_.OnStopSyncingPermanently();
js_sync_manager_observer_.OnClearServerDataSucceeded();
js_sync_manager_observer_.OnClearServerDataFailed();
+ js_sync_manager_observer_.OnEncryptionComplete();
PumpLoop();
}
@@ -190,10 +194,12 @@ TEST_F(JsSyncManagerObserverTest, SensitiveNotifiations) {
PumpLoop();
}
-TEST_F(JsSyncManagerObserverTest, OnEncryptionComplete) {
+TEST_F(JsSyncManagerObserverTest, OnEncryptedTypesChanged) {
DictionaryValue expected_details;
ListValue* encrypted_type_values = new ListValue();
+ const bool encrypt_everything = false;
expected_details.Set("encryptedTypes", encrypted_type_values);
+ expected_details.SetBoolean("encryptEverything", encrypt_everything);
syncable::ModelTypeSet encrypted_types;
for (int i = syncable::FIRST_REAL_MODEL_TYPE;
@@ -205,10 +211,11 @@ TEST_F(JsSyncManagerObserverTest, OnEncryptionComplete) {
}
EXPECT_CALL(mock_js_event_handler_,
- HandleJsEvent("onEncryptionComplete",
- HasDetailsAsDictionary(expected_details)));
+ HandleJsEvent("onEncryptedTypesChanged",
+ HasDetailsAsDictionary(expected_details)));
- js_sync_manager_observer_.OnEncryptionComplete(encrypted_types);
+ js_sync_manager_observer_.OnEncryptedTypesChanged(
+ encrypted_types, encrypt_everything);
PumpLoop();
}
« no previous file with comments | « chrome/browser/sync/js/js_sync_manager_observer.cc ('k') | chrome/browser/sync/profile_sync_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698