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

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: Revert to synchronous notifications 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
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..7fef820458c79b666dab1d6756f94bb5416269c5 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",
+ HandleJsEvent("onEncryptedTypesChanged",
HasDetailsAsDictionary(expected_details)));
Nicolas Zea 2011/10/21 14:29:07 indent
akalin 2011/10/22 03:28:38 Done.
- js_sync_manager_observer_.OnEncryptionComplete(encrypted_types);
+ js_sync_manager_observer_.OnEncryptedTypesChanged(
+ encrypted_types, encrypt_everything);
PumpLoop();
}

Powered by Google App Engine
This is Rietveld 408576698