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

Unified Diff: sync/syncable/syncable_unittest.cc

Issue 9699057: [Sync] Move 'sync' target to sync/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Tim's comments Created 8 years, 9 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 | « sync/syncable/syncable_mock.cc ('k') | sync/syncable/transaction_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/syncable/syncable_unittest.cc
diff --git a/chrome/browser/sync/syncable/syncable_unittest.cc b/sync/syncable/syncable_unittest.cc
similarity index 98%
rename from chrome/browser/sync/syncable/syncable_unittest.cc
rename to sync/syncable/syncable_unittest.cc
index 282fa7fd8859ca03430c02d93543659d285fad62..20b6840ed5bb5a22c3be7f87272b9dae91353f45 100644
--- a/chrome/browser/sync/syncable/syncable_unittest.cc
+++ b/sync/syncable/syncable_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/syncable/syncable.h"
+#include "sync/syncable/syncable.h"
#include <string>
@@ -19,19 +19,18 @@
#include "base/test/values_test_util.h"
#include "base/threading/platform_thread.h"
#include "base/values.h"
-#include "chrome/browser/sync/engine/syncproto.h"
-#include "chrome/browser/sync/internal_api/includes/test_unrecoverable_error_handler.h"
-#include "chrome/browser/sync/syncable/directory_backing_store.h"
-#include "chrome/browser/sync/syncable/directory_change_delegate.h"
-#include "chrome/browser/sync/syncable/on_disk_directory_backing_store.h"
-#include "chrome/browser/sync/test/engine/test_id_factory.h"
-#include "chrome/browser/sync/test/engine/test_syncable_utils.h"
-#include "chrome/browser/sync/test/fake_encryptor.h"
-#include "chrome/browser/sync/test/null_directory_change_delegate.h"
-#include "chrome/browser/sync/test/null_transaction_observer.h"
+#include "sync/engine/syncproto.h"
+#include "sync/util/test_unrecoverable_error_handler.h"
+#include "sync/syncable/directory_backing_store.h"
+#include "sync/syncable/directory_change_delegate.h"
+#include "sync/syncable/on_disk_directory_backing_store.h"
+#include "sync/test/engine/test_id_factory.h"
+#include "sync/test/engine/test_syncable_utils.h"
+#include "sync/test/fake_encryptor.h"
+#include "sync/test/null_directory_change_delegate.h"
+#include "sync/test/null_transaction_observer.h"
#include "sync/protocol/bookmark_specifics.pb.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "third_party/sqlite/sqlite3.h"
using base::ExpectDictBooleanValue;
using base::ExpectDictStringValue;
@@ -420,7 +419,6 @@ class SyncableDirectoryTest : public testing::Test {
protected:
MessageLoop message_loop_;
static const char kName[];
- static const Id kId;
virtual void SetUp() {
dir_.reset(new Directory(&encryptor_, &handler_, NULL));
@@ -486,9 +484,9 @@ class SyncableDirectoryTest : public testing::Test {
scoped_ptr<Directory> dir_;
NullDirectoryChangeDelegate delegate_;
- // Creates an empty entry and sets the ID field to the default kId.
+ // Creates an empty entry and sets the ID field to a default one.
void CreateEntry(const std::string& entryname) {
- CreateEntry(entryname, kId);
+ CreateEntry(entryname, TestIdFactory::FromNumber(-99));
}
// Creates an empty entry and sets the ID field to id.
@@ -704,19 +702,19 @@ TEST_F(SyncableDirectoryTest, TakeSnapshotGetsOnlyDirtyHandlesTest) {
}
const char SyncableDirectoryTest::kName[] = "Foo";
-const Id SyncableDirectoryTest::kId(TestIdFactory::FromNumber(-99));
namespace {
+
TEST_F(SyncableDirectoryTest, TestBasicLookupNonExistantID) {
ReadTransaction rtrans(FROM_HERE, dir_.get());
- Entry e(&rtrans, GET_BY_ID, kId);
+ Entry e(&rtrans, GET_BY_ID, TestIdFactory::FromNumber(-99));
ASSERT_FALSE(e.good());
}
TEST_F(SyncableDirectoryTest, TestBasicLookupValidID) {
CreateEntry("rtc");
ReadTransaction rtrans(FROM_HERE, dir_.get());
- Entry e(&rtrans, GET_BY_ID, kId);
+ Entry e(&rtrans, GET_BY_ID, TestIdFactory::FromNumber(-99));
ASSERT_TRUE(e.good());
}
« no previous file with comments | « sync/syncable/syncable_mock.cc ('k') | sync/syncable/transaction_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698