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

Unified Diff: sync/test/engine/test_directory_setter_upper.h

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 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/test/engine/single_type_mock_server.cc ('k') | sync/test/engine/test_directory_setter_upper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/test/engine/test_directory_setter_upper.h
diff --git a/sync/test/engine/test_directory_setter_upper.h b/sync/test/engine/test_directory_setter_upper.h
deleted file mode 100644
index cd9674719212464854d9832191669b920cd9a0ee..0000000000000000000000000000000000000000
--- a/sync/test/engine/test_directory_setter_upper.h
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-//
-// A handy class that takes care of setting up and destroying a
-// syncable::Directory instance for unit tests that require one.
-//
-// The expected usage is to make this a component of your test fixture:
-//
-// class AwesomenessTest : public testing::Test {
-// public:
-// virtual void SetUp() {
-// metadb_.SetUp();
-// }
-// virtual void TearDown() {
-// metadb_.TearDown();
-// }
-// protected:
-// TestDirectorySetterUpper metadb_;
-// };
-//
-// Then, in your tests, get at the directory like so:
-//
-// TEST_F(AwesomenessTest, IsMaximal) {
-// ... now use metadb_.directory() to get at syncable::Entry objects ...
-// }
-//
-
-#ifndef SYNC_TEST_ENGINE_TEST_DIRECTORY_SETTER_UPPER_H_
-#define SYNC_TEST_ENGINE_TEST_DIRECTORY_SETTER_UPPER_H_
-
-#include <memory>
-#include <string>
-
-#include "base/compiler_specific.h"
-#include "base/macros.h"
-#include "sync/test/fake_sync_encryption_handler.h"
-#include "sync/test/null_directory_change_delegate.h"
-#include "sync/util/test_unrecoverable_error_handler.h"
-#include "testing/gmock/include/gmock/gmock.h"
-
-namespace syncer {
-
-namespace syncable {
-class Directory;
-class DirectoryBackingStore;
-class TestTransactionObserver;
-}
-
-class TestDirectorySetterUpper {
- public:
- TestDirectorySetterUpper();
- virtual ~TestDirectorySetterUpper();
-
- // Create a Directory instance open it.
- virtual void SetUp();
-
- // Create a Directory instance using |directory_store| as backend storage.
- // Takes ownership of |directory_store|.
- virtual void SetUpWith(
- syncer::syncable::DirectoryBackingStore* directory_store);
-
- // Undo everything done by SetUp(): close the directory and delete the
- // backing files. Before closing the directory, this will run the directory
- // invariant checks and perform the SaveChanges action on the directory.
- virtual void TearDown();
-
- syncable::Directory* directory() { return directory_.get(); }
-
- SyncEncryptionHandler* encryption_handler() { return &encryption_handler_; }
-
- syncable::TestTransactionObserver* transaction_observer() {
- return test_transaction_observer_.get();
- }
-
- private:
- syncable::NullDirectoryChangeDelegate delegate_;
- std::unique_ptr<syncable::TestTransactionObserver> test_transaction_observer_;
- TestUnrecoverableErrorHandler handler_;
-
- void RunInvariantCheck();
-
- FakeSyncEncryptionHandler encryption_handler_;
- std::unique_ptr<syncable::Directory> directory_;
- std::string name_;
-
- DISALLOW_COPY_AND_ASSIGN(TestDirectorySetterUpper);
-};
-
-} // namespace syncer
-
-#endif // SYNC_TEST_ENGINE_TEST_DIRECTORY_SETTER_UPPER_H_
« no previous file with comments | « sync/test/engine/single_type_mock_server.cc ('k') | sync/test/engine/test_directory_setter_upper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698