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

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

Issue 6465005: [Sync] Initial support for encrypting any datatype (no UI hookup yet). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + small fix Created 9 years, 10 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_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_sync_manager_observer_unittest.cc
diff --git a/chrome/browser/sync/js_sync_manager_observer_unittest.cc b/chrome/browser/sync/js_sync_manager_observer_unittest.cc
index 11df4d594e354deeb56cccdf4cbfeac96c7f814e..573ba8edfefbbb5c7b11911582d8b8ef93418d0e 100644
--- a/chrome/browser/sync/js_sync_manager_observer_unittest.cc
+++ b/chrome/browser/sync/js_sync_manager_observer_unittest.cc
@@ -149,6 +149,26 @@ TEST_F(JsSyncManagerObserverTest, SensitiveNotifiations) {
sync_manager_observer_.OnPassphraseAccepted("sensitive_token");
}
+TEST_F(JsSyncManagerObserverTest, OnEncryptionComplete) {
+ ListValue expected_args;
+ ListValue* encrypted_type_values = new ListValue();
+ syncable::ModelTypeSet encrypted_types;
+
+ expected_args.Append(encrypted_type_values);
+ for (int i = syncable::FIRST_REAL_MODEL_TYPE;
+ i < syncable::MODEL_TYPE_COUNT; ++i) {
+ syncable::ModelType type = syncable::ModelTypeFromInt(i);
+ encrypted_types.insert(type);
+ encrypted_type_values->Append(Value::CreateStringValue(
+ syncable::ModelTypeToString(type)));
+ }
+
+ EXPECT_CALL(mock_router_,
+ RouteJsEvent("onEncryptionComplete",
+ HasArgsAsList(expected_args), NULL));
+
+ sync_manager_observer_.OnEncryptionComplete(encrypted_types);
+}
namespace {
// Makes a node of the given model type. Returns the id of the
« no previous file with comments | « chrome/browser/sync/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