| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TEST_LIVE_SYNC_LIVE_SYNC_TEST_H_ | 5 #ifndef CHROME_TEST_LIVE_SYNC_LIVE_SYNC_TEST_H_ |
| 6 #define CHROME_TEST_LIVE_SYNC_LIVE_SYNC_TEST_H_ | 6 #define CHROME_TEST_LIVE_SYNC_LIVE_SYNC_TEST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/test/in_process_browser_test.h" | 9 #include "chrome/test/in_process_browser_test.h" |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
| 13 #include "base/process_util.h" | 13 #include "base/process_util.h" |
| 14 #include "base/scoped_ptr.h" | 14 #include "base/scoped_ptr.h" |
| 15 #include "base/scoped_vector.h" | 15 #include "base/scoped_vector.h" |
| 16 #include "chrome/browser/sync/profile_sync_service_harness.h" | |
| 17 #include "chrome/common/net/test_url_fetcher_factory.h" | |
| 18 #include "net/base/mock_host_resolver.h" | 16 #include "net/base/mock_host_resolver.h" |
| 19 #include "net/test/test_server.h" | 17 #include "net/test/test_server.h" |
| 20 | 18 |
| 21 #include <string> | 19 #include <string> |
| 22 #include <vector> | 20 #include <vector> |
| 23 | 21 |
| 24 class CommandLine; | 22 class CommandLine; |
| 25 class Profile; | 23 class Profile; |
| 24 class ProfileSyncServiceHarness; |
| 26 class URLRequestContextGetter; | 25 class URLRequestContextGetter; |
| 26 class FakeURLFetcherFactory; |
| 27 | 27 |
| 28 namespace net { | 28 namespace net { |
| 29 class ProxyConfig; | 29 class ProxyConfig; |
| 30 class ScopedDefaultHostResolverProc; | 30 class ScopedDefaultHostResolverProc; |
| 31 } | 31 } |
| 32 | 32 |
| 33 // This is the base class for integration tests for all sync data types. Derived | 33 // This is the base class for integration tests for all sync data types. Derived |
| 34 // classes must be defined for each sync data type. Individual tests are defined | 34 // classes must be defined for each sync data type. Individual tests are defined |
| 35 // using the IN_PROC_BROWSER_TEST_F macro. | 35 // using the IN_PROC_BROWSER_TEST_F macro. |
| 36 class LiveSyncTest : public InProcessBrowserTest { | 36 class LiveSyncTest : public InProcessBrowserTest { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 51 MULTIPLE_CLIENT, | 51 MULTIPLE_CLIENT, |
| 52 | 52 |
| 53 // Tests where several client profiles are synced with the server. Only used | 53 // Tests where several client profiles are synced with the server. Only used |
| 54 // by stress tests. | 54 // by stress tests. |
| 55 MANY_CLIENT | 55 MANY_CLIENT |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 // A LiveSyncTest must be associated with a particular test type. | 58 // A LiveSyncTest must be associated with a particular test type. |
| 59 explicit LiveSyncTest(TestType test_type); | 59 explicit LiveSyncTest(TestType test_type); |
| 60 | 60 |
| 61 virtual ~LiveSyncTest() {} | 61 virtual ~LiveSyncTest(); |
| 62 | 62 |
| 63 // Validates command line parameters and creates a local python test server if | 63 // Validates command line parameters and creates a local python test server if |
| 64 // specified. | 64 // specified. |
| 65 virtual void SetUp(); | 65 virtual void SetUp(); |
| 66 | 66 |
| 67 // Brings down local python test server if one was created. | 67 // Brings down local python test server if one was created. |
| 68 virtual void TearDown(); | 68 virtual void TearDown(); |
| 69 | 69 |
| 70 // Sets up command line flags required for sync tests. | 70 // Sets up command line flags required for sync tests. |
| 71 virtual void SetUpCommandLine(CommandLine* cl); | 71 virtual void SetUpCommandLine(CommandLine* cl); |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 // Used to start and stop the local test server. | 213 // Used to start and stop the local test server. |
| 214 base::ProcessHandle test_server_handle_; | 214 base::ProcessHandle test_server_handle_; |
| 215 | 215 |
| 216 // Fake URLFetcher factory used to mock out GAIA signin. | 216 // Fake URLFetcher factory used to mock out GAIA signin. |
| 217 scoped_ptr<FakeURLFetcherFactory> factory_; | 217 scoped_ptr<FakeURLFetcherFactory> factory_; |
| 218 | 218 |
| 219 DISALLOW_COPY_AND_ASSIGN(LiveSyncTest); | 219 DISALLOW_COPY_AND_ASSIGN(LiveSyncTest); |
| 220 }; | 220 }; |
| 221 | 221 |
| 222 #endif // CHROME_TEST_LIVE_SYNC_LIVE_SYNC_TEST_H_ | 222 #endif // CHROME_TEST_LIVE_SYNC_LIVE_SYNC_TEST_H_ |
| OLD | NEW |