Enables compositing support for webview.
[chromium-blink-merge.git] / net / test / local_sync_test_server.h
blobfbd5f9dd1d2b399005d0ac46f59f23bc75a19a1d
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef NET_TEST_LOCAL_SYNC_TEST_SERVER_H_
6 #define NET_TEST_LOCAL_SYNC_TEST_SERVER_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "net/test/local_test_server.h"
12 namespace net {
14 // Runs a Python-based sync test server on the same machine in which the
15 // LocalSyncTestServer runs.
16 class LocalSyncTestServer : public LocalTestServer {
17 public:
18 // Initialize a sync server that listens on localhost using ephemeral ports
19 // for sync and p2p notifications.
20 LocalSyncTestServer();
22 // Initialize a sync server that listens on |port| for sync updates and
23 // |xmpp_port| for p2p notifications.
24 LocalSyncTestServer(uint16 port, uint16 xmpp_port);
26 virtual ~LocalSyncTestServer();
28 // Calls LocalTestServer::AddCommandLineArguments and then appends the
29 // --xmpp-port flag to |command_line| if required. Returns true on success.
30 virtual bool AddCommandLineArguments(
31 CommandLine* command_line) const OVERRIDE;
33 private:
34 // Port on which the Sync XMPP server listens.
35 uint16 xmpp_port_;
37 DISALLOW_COPY_AND_ASSIGN(LocalSyncTestServer);
40 } // namespace net
42 #endif // NET_TEST_LOCAL_SYNC_TEST_SERVER_H_