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

Unified Diff: chrome/browser/sync/internal_api/syncapi_unittest.cc

Issue 7970018: sync: we can't lookup empty client tag nodes, so don't allow creating them (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 | « no previous file | chrome/browser/sync/internal_api/write_node.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/internal_api/syncapi_unittest.cc
diff --git a/chrome/browser/sync/internal_api/syncapi_unittest.cc b/chrome/browser/sync/internal_api/syncapi_unittest.cc
index 529867e22dd91700282b0ce4753bc221268d474d..b1c04a19eaeb53b7e59ff94e1e0644508c28ac05 100644
--- a/chrome/browser/sync/internal_api/syncapi_unittest.cc
+++ b/chrome/browser/sync/internal_api/syncapi_unittest.cc
@@ -690,6 +690,17 @@ TEST_F(SyncApiTest, ChangeRecordToValue) {
}
}
+TEST_F(SyncApiTest, EmptyTags) {
+ WriteTransaction trans(FROM_HERE, test_user_share_.user_share());
+ ReadNode root_node(&trans);
+ root_node.InitByRootLookup();
+ WriteNode node(&trans);
+ std::string empty_tag;
+ EXPECT_FALSE(node.InitUniqueByCreation(
+ syncable::TYPED_URLS, root_node, empty_tag));
+ EXPECT_FALSE(node.InitByTagLookup(empty_tag));
+}
+
namespace {
class TestHttpPostProviderInterface : public HttpPostProviderInterface {
« no previous file with comments | « no previous file | chrome/browser/sync/internal_api/write_node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698