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

Side by Side Diff: sync/syncable/syncable_unittest.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sync/syncable/model_type.cc ('k') | sync/syncable/syncable_write_transaction.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 2235 matching lines...) Expand 10 before | Expand all | Expand 10 after
2246 TestIdFactory factory_; 2246 TestIdFactory factory_;
2247 }; 2247 };
2248 2248
2249 TEST_F(SyncableClientTagTest, TestClientTagClear) { 2249 TEST_F(SyncableClientTagTest, TestClientTagClear) {
2250 Id server_id = factory_.NewServerId(); 2250 Id server_id = factory_.NewServerId();
2251 EXPECT_TRUE(CreateWithDefaultTag(server_id, false)); 2251 EXPECT_TRUE(CreateWithDefaultTag(server_id, false));
2252 { 2252 {
2253 WriteTransaction trans(FROM_HERE, UNITTEST, dir_.get()); 2253 WriteTransaction trans(FROM_HERE, UNITTEST, dir_.get());
2254 MutableEntry me(&trans, GET_BY_CLIENT_TAG, test_tag_); 2254 MutableEntry me(&trans, GET_BY_CLIENT_TAG, test_tag_);
2255 EXPECT_TRUE(me.good()); 2255 EXPECT_TRUE(me.good());
2256 me.Put(UNIQUE_CLIENT_TAG, ""); 2256 me.Put(UNIQUE_CLIENT_TAG, std::string());
2257 } 2257 }
2258 { 2258 {
2259 ReadTransaction trans(FROM_HERE, dir_.get()); 2259 ReadTransaction trans(FROM_HERE, dir_.get());
2260 Entry by_tag(&trans, GET_BY_CLIENT_TAG, test_tag_); 2260 Entry by_tag(&trans, GET_BY_CLIENT_TAG, test_tag_);
2261 EXPECT_FALSE(by_tag.good()); 2261 EXPECT_FALSE(by_tag.good());
2262 2262
2263 Entry by_id(&trans, GET_BY_ID, server_id); 2263 Entry by_id(&trans, GET_BY_ID, server_id);
2264 EXPECT_TRUE(by_id.good()); 2264 EXPECT_TRUE(by_id.good());
2265 EXPECT_TRUE(by_id.Get(UNIQUE_CLIENT_TAG).empty()); 2265 EXPECT_TRUE(by_id.Get(UNIQUE_CLIENT_TAG).empty());
2266 } 2266 }
(...skipping 27 matching lines...) Expand all
2294 EXPECT_TRUE(CreateWithDefaultTag(factory_.NewServerId(), true)); 2294 EXPECT_TRUE(CreateWithDefaultTag(factory_.NewServerId(), true));
2295 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewServerId(), true)); 2295 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewServerId(), true));
2296 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewServerId(), false)); 2296 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewServerId(), false));
2297 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewLocalId(), false)); 2297 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewLocalId(), false));
2298 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewLocalId(), true)); 2298 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewLocalId(), true));
2299 } 2299 }
2300 2300
2301 } // namespace 2301 } // namespace
2302 } // namespace syncable 2302 } // namespace syncable
2303 } // namespace syncer 2303 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/syncable/model_type.cc ('k') | sync/syncable/syncable_write_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698