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

Unified Diff: chrome/browser/sync/test/integration/sync_test.h

Issue 115243007: Basic implementation of the Sync C++ fake server (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move files Created 6 years, 11 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
Index: chrome/browser/sync/test/integration/sync_test.h
diff --git a/chrome/browser/sync/test/integration/sync_test.h b/chrome/browser/sync/test/integration/sync_test.h
index 7a80b288198afdbfc8225de00cc532045cc5ad16..ffeb0660b28e8289c0a81513c6a60ed0a3a5bb5f 100644
--- a/chrome/browser/sync/test/integration/sync_test.h
+++ b/chrome/browser/sync/test/integration/sync_test.h
@@ -18,6 +18,7 @@
#include "net/url_request/url_request_status.h"
#include "sync/internal_api/public/base/model_type.h"
#include "sync/protocol/sync_protocol_error.h"
+#include "sync/test/fake_server/fake_server.h"
#include "sync/test/local_sync_test_server.h"
@@ -57,14 +58,18 @@ class SyncTest : public InProcessBrowserTest {
// The type of server we're running against.
enum ServerType {
SERVER_TYPE_UNDECIDED,
- LOCAL_PYTHON_SERVER, // The mock python server that runs locally and is
- // part of the Chromium checkout.
- LOCAL_LIVE_SERVER, // Some other server (maybe the real binary used by
- // Google's sync service) that can be started on
- // a per-test basis by running a command
- EXTERNAL_LIVE_SERVER, // A remote server that the test code has no control
- // over whatsoever; cross your fingers that the
- // account state is initially clean.
+ LOCAL_PYTHON_SERVER, // The mock python server that runs locally and is
+ // part of the Chromium checkout.
+ LOCAL_LIVE_SERVER, // Some other server (maybe the real binary used by
+ // Google's sync service) that can be started on
+ // a per-test basis by running a command
+ EXTERNAL_LIVE_SERVER, // A remote server that the test code has no control
+ // over whatsoever; cross your fingers that the
+ // account state is initially clean.
+ IN_PROCESS_FAKE_SERVER, // The fake Sync server (FakeServer) running
+ // in-process (bypassing HTTP calls). This
+ // ServerType will eventually replace
+ // LOCAL_PYTHON_SERVER.
};
// NOTE: IMPORTANT the enum here should match with
@@ -251,6 +256,12 @@ class SyncTest : public InProcessBrowserTest {
void DisableNotificationsImpl();
void EnableNotificationsImpl();
+ // Set up the test to use the in-process fake server. This must be called
+ // before SetUp().
+ // TODO(pvalenzuela): Remove this method when the C++ fake server becomes
+ // the default server type.
+ void UseFakeServer();
+
// GAIA account used by the test case.
std::string username_;
@@ -260,6 +271,9 @@ class SyncTest : public InProcessBrowserTest {
// Locally available plain text file in which GAIA credentials are stored.
base::FilePath password_file_;
+ // The FakeServer used in tests with server type IN_PROCESS_FAKE_SERVER.
+ scoped_ptr<syncer::FakeServer> fake_server_;
+
private:
// Helper to ProfileManager::CreateProfile that handles path creation.
static Profile* MakeProfile(const base::FilePath::StringType name);

Powered by Google App Engine
This is Rietveld 408576698