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

Unified Diff: chrome/browser/sync/invalidations/invalidator_storage_unittest.cc

Issue 10451060: sync: migrate invalidation state from syncable::Directory to InvalidationStorage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: include order Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sync/invalidations/invalidator_storage.cc ('k') | chrome/common/pref_names.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/invalidations/invalidator_storage_unittest.cc
diff --git a/chrome/browser/sync/invalidations/invalidator_storage_unittest.cc b/chrome/browser/sync/invalidations/invalidator_storage_unittest.cc
index 765f3322233a467ce794852f083301005d435f36..dd68a650aa01be3c5bea442437580fc523e97acc 100644
--- a/chrome/browser/sync/invalidations/invalidator_storage_unittest.cc
+++ b/chrome/browser/sync/invalidations/invalidator_storage_unittest.cc
@@ -7,6 +7,7 @@
#include "base/message_loop.h"
#include "base/string_number_conversions.h"
+#include "base/string_util.h"
#include "chrome/test/base/testing_pref_service.h"
#include "sync/syncable/model_type.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -126,4 +127,13 @@ TEST_F(InvalidatorStorageTest, DeserializeBasic) {
EXPECT_EQ(15, map[syncable::BOOKMARKS]);
}
+TEST_F(InvalidatorStorageTest, SetGetInvalidationState) {
+ InvalidatorStorage storage(&pref_service_);
+ const std::string mess("n\0tK\0\0l\344", 8);
+ ASSERT_FALSE(IsStringUTF8(mess));
+
+ storage.SetInvalidationState(mess);
+ EXPECT_EQ(mess, storage.GetInvalidationState());
+}
+
} // namespace browser_sync
« no previous file with comments | « chrome/browser/sync/invalidations/invalidator_storage.cc ('k') | chrome/common/pref_names.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698