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

Side by Side Diff: sync/test/local_sync_test_server.h

Issue 11971025: [sync] Divorce python sync test server chromiumsync.py from testserver.py (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sync/test/DEPS ('k') | sync/test/local_sync_test_server.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef NET_TEST_LOCAL_SYNC_TEST_SERVER_H_ 5 #ifndef SYNC_TEST_LOCAL_SYNC_TEST_SERVER_H_
6 #define NET_TEST_LOCAL_SYNC_TEST_SERVER_H_ 6 #define SYNC_TEST_LOCAL_SYNC_TEST_SERVER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "net/test/local_test_server.h" 10 #include "net/test/local_test_server.h"
11 11
12 namespace net { 12 namespace syncer {
13 13
14 // Runs a Python-based sync test server on the same machine in which the 14 // Runs a Python-based sync test server on the same machine on which the
15 // LocalSyncTestServer runs. 15 // LocalSyncTestServer runs.
16 class LocalSyncTestServer : public LocalTestServer { 16 class LocalSyncTestServer : public net::LocalTestServer {
17 public: 17 public:
18 // Initialize a sync server that listens on localhost using ephemeral ports 18 // Initialize a sync server that listens on localhost using ephemeral ports
19 // for sync and p2p notifications. 19 // for sync and p2p notifications.
20 LocalSyncTestServer(); 20 LocalSyncTestServer();
21 21
22 // Initialize a sync server that listens on |port| for sync updates and 22 // Initialize a sync server that listens on |port| for sync updates and
23 // |xmpp_port| for p2p notifications. 23 // |xmpp_port| for p2p notifications.
24 LocalSyncTestServer(uint16 port, uint16 xmpp_port); 24 LocalSyncTestServer(uint16 port, uint16 xmpp_port);
25 25
26 virtual ~LocalSyncTestServer(); 26 virtual ~LocalSyncTestServer();
27 27
28 // Calls LocalTestServer::AddCommandLineArguments and then appends the 28 // Overriden from net::LocalTestServer.
29 // --xmpp-port flag to |command_line| if required. Returns true on success.
30 virtual bool AddCommandLineArguments( 29 virtual bool AddCommandLineArguments(
31 CommandLine* command_line) const OVERRIDE; 30 CommandLine* command_line) const OVERRIDE;
31 virtual bool SetPythonPath() const OVERRIDE;
32 virtual bool GetTestServerPath(FilePath* testserver_path) const OVERRIDE;
33
34 // Returns true if the path to |test_script_name| is successfully stored in
35 // |*test_script_path|. Used by the run_sync_testserver executable.
36 bool GetTestScriptPath(const FilePath::StringType& test_script_name,
37 FilePath* test_script_path) const;
32 38
33 private: 39 private:
34 // Port on which the Sync XMPP server listens. 40 // Port on which the Sync XMPP server listens.
35 uint16 xmpp_port_; 41 uint16 xmpp_port_;
36 42
37 DISALLOW_COPY_AND_ASSIGN(LocalSyncTestServer); 43 DISALLOW_COPY_AND_ASSIGN(LocalSyncTestServer);
38 }; 44 };
39 45
40 } // namespace net 46 } // namespace syncer
41 47
42 #endif // NET_TEST_LOCAL_SYNC_TEST_SERVER_H_ 48 #endif // SYNC_TEST_LOCAL_SYNC_TEST_SERVER_H_
OLDNEW
« no previous file with comments | « sync/test/DEPS ('k') | sync/test/local_sync_test_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698