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

Side by Side Diff: chrome/browser/sync/test/integration/sync_test.h

Issue 7841007: Rename browser/sync/test/live_sync directory to browser/sync/test/integration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "" Created 9 years, 3 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
OLDNEW
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_BROWSER_SYNC_TEST_LIVE_SYNC_LIVE_SYNC_TEST_H_ 5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_
6 #define CHROME_BROWSER_SYNC_TEST_LIVE_SYNC_LIVE_SYNC_TEST_H_ 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/test/base/in_process_browser_test.h" 9 #include "chrome/test/base/in_process_browser_test.h"
10 10
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/basictypes.h" 14 #include "base/basictypes.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"
(...skipping 11 matching lines...) Expand all
28 28
29 namespace net { 29 namespace net {
30 class ProxyConfig; 30 class ProxyConfig;
31 class ScopedDefaultHostResolverProc; 31 class ScopedDefaultHostResolverProc;
32 class URLRequestContextGetter; 32 class URLRequestContextGetter;
33 } 33 }
34 34
35 // This is the base class for integration tests for all sync data types. Derived 35 // This is the base class for integration tests for all sync data types. Derived
36 // classes must be defined for each sync data type. Individual tests are defined 36 // classes must be defined for each sync data type. Individual tests are defined
37 // using the IN_PROC_BROWSER_TEST_F macro. 37 // using the IN_PROC_BROWSER_TEST_F macro.
38 class LiveSyncTest : public InProcessBrowserTest { 38 class SyncTest : public InProcessBrowserTest {
39 public: 39 public:
40 // The different types of live sync tests that can be implemented. 40 // The different types of live sync tests that can be implemented.
41 enum TestType { 41 enum TestType {
42 // Tests where only one client profile is synced with the server. Typically 42 // Tests where only one client profile is synced with the server. Typically
43 // sanity level tests. 43 // sanity level tests.
44 SINGLE_CLIENT, 44 SINGLE_CLIENT,
45 45
46 // Tests where two client profiles are synced with the server. Typically 46 // Tests where two client profiles are synced with the server. Typically
47 // functionality level tests. 47 // functionality level tests.
48 TWO_CLIENT, 48 TWO_CLIENT,
(...skipping 14 matching lines...) Expand all
63 LOCAL_PYTHON_SERVER, // The mock python server that runs locally and is 63 LOCAL_PYTHON_SERVER, // The mock python server that runs locally and is
64 // part of the Chromium checkout. 64 // part of the Chromium checkout.
65 LOCAL_LIVE_SERVER, // Some other server (maybe the real binary used by 65 LOCAL_LIVE_SERVER, // Some other server (maybe the real binary used by
66 // Google's sync service) that can be started on 66 // Google's sync service) that can be started on
67 // a per-test basis by running a command 67 // a per-test basis by running a command
68 EXTERNAL_LIVE_SERVER, // A remote server that the test code has no control 68 EXTERNAL_LIVE_SERVER, // A remote server that the test code has no control
69 // over whatsoever; cross your fingers that the 69 // over whatsoever; cross your fingers that the
70 // account state is initially clean. 70 // account state is initially clean.
71 }; 71 };
72 72
73 // A LiveSyncTest must be associated with a particular test type. 73 // A SyncTest must be associated with a particular test type.
74 explicit LiveSyncTest(TestType test_type); 74 explicit SyncTest(TestType test_type);
75 75
76 virtual ~LiveSyncTest(); 76 virtual ~SyncTest();
77 77
78 // Validates command line parameters and creates a local python test server if 78 // Validates command line parameters and creates a local python test server if
79 // specified. 79 // specified.
80 virtual void SetUp() OVERRIDE; 80 virtual void SetUp() OVERRIDE;
81 81
82 // Brings down local python test server if one was created. 82 // Brings down local python test server if one was created.
83 virtual void TearDown() OVERRIDE; 83 virtual void TearDown() OVERRIDE;
84 84
85 // Sets up command line flags required for sync tests. 85 // Sets up command line flags required for sync tests.
86 virtual void SetUpCommandLine(CommandLine* cl) OVERRIDE; 86 virtual void SetUpCommandLine(CommandLine* cl) OVERRIDE;
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 302
303 // Used to start and stop the local test server. 303 // Used to start and stop the local test server.
304 base::ProcessHandle test_server_handle_; 304 base::ProcessHandle test_server_handle_;
305 305
306 // Fake URLFetcher factory used to mock out GAIA signin. 306 // Fake URLFetcher factory used to mock out GAIA signin.
307 scoped_ptr<FakeURLFetcherFactory> fake_factory_; 307 scoped_ptr<FakeURLFetcherFactory> fake_factory_;
308 308
309 // The URLFetcherFactory instance used to instantiate |fake_factory_|. 309 // The URLFetcherFactory instance used to instantiate |fake_factory_|.
310 scoped_ptr<URLFetcherFactory> factory_; 310 scoped_ptr<URLFetcherFactory> factory_;
311 311
312 DISALLOW_COPY_AND_ASSIGN(LiveSyncTest); 312 DISALLOW_COPY_AND_ASSIGN(SyncTest);
313 }; 313 };
314 314
315 DISABLE_RUNNABLE_METHOD_REFCOUNT(LiveSyncTest); 315 DISABLE_RUNNABLE_METHOD_REFCOUNT(SyncTest);
316 316
317 #endif // CHROME_BROWSER_SYNC_TEST_LIVE_SYNC_LIVE_SYNC_TEST_H_ 317 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/test/integration/sync_extension_helper.cc ('k') | chrome/browser/sync/test/integration/sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698