OLD | NEW |
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 CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_ | 5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_ |
6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_ | 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_ |
7 | 7 |
8 #include "chrome/test/base/in_process_browser_test.h" | 8 #include "chrome/test/base/in_process_browser_test.h" |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
15 #include "base/file_util.h" | 15 #include "base/file_util.h" |
16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
17 #include "base/memory/scoped_vector.h" | 17 #include "base/memory/scoped_vector.h" |
18 #include "base/process_util.h" | 18 #include "base/process_util.h" |
19 #include "net/base/mock_host_resolver.h" | 19 #include "net/base/mock_host_resolver.h" |
20 #include "net/test/local_sync_test_server.h" | |
21 #include "sync/internal_api/public/base/model_type.h" | 20 #include "sync/internal_api/public/base/model_type.h" |
22 #include "sync/protocol/sync_protocol_error.h" | 21 #include "sync/protocol/sync_protocol_error.h" |
| 22 #include "sync/test/local_sync_test_server.h" |
23 | 23 |
24 class CommandLine; | 24 class CommandLine; |
25 class Profile; | 25 class Profile; |
26 class ProfileSyncServiceHarness; | 26 class ProfileSyncServiceHarness; |
27 | 27 |
28 namespace net { | 28 namespace net { |
29 class FakeURLFetcherFactory; | 29 class FakeURLFetcherFactory; |
30 class ProxyConfig; | 30 class ProxyConfig; |
31 class ScopedDefaultHostResolverProc; | 31 class ScopedDefaultHostResolverProc; |
32 class URLFetcherImplFactory; | 32 class URLFetcherImplFactory; |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 // Helper method used to set up fake responses for kClientLoginUrl, | 295 // Helper method used to set up fake responses for kClientLoginUrl, |
296 // kIssueAuthTokenUrl, kGetUserInfoUrl and kSearchDomainCheckUrl in order to | 296 // kIssueAuthTokenUrl, kGetUserInfoUrl and kSearchDomainCheckUrl in order to |
297 // mock out calls to GAIA servers. | 297 // mock out calls to GAIA servers. |
298 void SetupMockGaiaResponses(); | 298 void SetupMockGaiaResponses(); |
299 | 299 |
300 // Helper method used to clear any fake responses that might have been set for | 300 // Helper method used to clear any fake responses that might have been set for |
301 // various gaia URLs, cancel any outstanding URL requests, and return to using | 301 // various gaia URLs, cancel any outstanding URL requests, and return to using |
302 // the default URLFetcher creation mechanism. | 302 // the default URLFetcher creation mechanism. |
303 void ClearMockGaiaResponses(); | 303 void ClearMockGaiaResponses(); |
304 | 304 |
305 // Test server of type sync, started on demand. | 305 // Python sync test server, started on demand. |
306 net::LocalSyncTestServer sync_server_; | 306 syncer::LocalSyncTestServer sync_server_; |
307 | 307 |
308 // Helper class to whitelist the notification port. | 308 // Helper class to whitelist the notification port. |
309 scoped_ptr<net::ScopedPortException> xmpp_port_; | 309 scoped_ptr<net::ScopedPortException> xmpp_port_; |
310 | 310 |
311 // Used to differentiate between single-client, two-client, multi-client and | 311 // Used to differentiate between single-client, two-client, multi-client and |
312 // many-client tests. | 312 // many-client tests. |
313 TestType test_type_; | 313 TestType test_type_; |
314 | 314 |
315 // Tells us what kind of server we're using (some tests run only on certain | 315 // Tells us what kind of server we're using (some tests run only on certain |
316 // server types). | 316 // server types). |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 scoped_ptr<net::URLFetcherImplFactory> factory_; | 362 scoped_ptr<net::URLFetcherImplFactory> factory_; |
363 | 363 |
364 // Number of default entries (as determined by the existing entries at setup | 364 // Number of default entries (as determined by the existing entries at setup |
365 // time on client 0). | 365 // time on client 0). |
366 size_t number_of_default_sync_items_; | 366 size_t number_of_default_sync_items_; |
367 | 367 |
368 DISALLOW_COPY_AND_ASSIGN(SyncTest); | 368 DISALLOW_COPY_AND_ASSIGN(SyncTest); |
369 }; | 369 }; |
370 | 370 |
371 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_ | 371 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_ |
OLD | NEW |