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

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

Issue 772513004: Add new E2E sync multi profiles tests. This should not affect any existing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: implement OnSyncCycleCompleted send refresh notifications Created 6 years 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
OLDNEW
1 // Copyright 2013 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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/scoped_vector.h" 14 #include "base/memory/scoped_vector.h"
15 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/test/base/in_process_browser_test.h" 16 #include "chrome/test/base/in_process_browser_test.h"
17 #include "net/dns/mock_host_resolver.h" 17 #include "net/dns/mock_host_resolver.h"
18 #include "net/http/http_status_code.h" 18 #include "net/http/http_status_code.h"
19 #include "net/url_request/url_request_status.h" 19 #include "net/url_request/url_request_status.h"
20 #include "sync/internal_api/public/base/model_type.h" 20 #include "sync/internal_api/public/base/model_type.h"
21 #include "sync/protocol/sync_protocol_error.h" 21 #include "sync/protocol/sync_protocol_error.h"
22 #include "sync/test/fake_server/fake_server.h" 22 #include "sync/test/fake_server/fake_server.h"
23 #include "sync/test/local_sync_test_server.h" 23 #include "sync/test/local_sync_test_server.h"
24 24
25 class ProfileSyncService; 25 class ProfileSyncService;
26 class ProfileSyncServiceHarness; 26 class ProfileSyncServiceHarness;
27 class P2PInvalidationForwarder; 27 class P2PInvalidationForwarder;
28 class P2PSyncRefresher;
28 29
29 namespace base { 30 namespace base {
30 class CommandLine; 31 class CommandLine;
31 } 32 }
32 33
33 namespace fake_server { 34 namespace fake_server {
34 class FakeServer; 35 class FakeServer;
35 class FakeServerInvalidationService; 36 class FakeServerInvalidationService;
36 } 37 }
37 38
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 358
358 // Collection of sync clients used by a test. A sync client is associated with 359 // Collection of sync clients used by a test. A sync client is associated with
359 // a sync profile, and implements methods that sync the contents of the 360 // a sync profile, and implements methods that sync the contents of the
360 // profile with the server. 361 // profile with the server.
361 ScopedVector<ProfileSyncServiceHarness> clients_; 362 ScopedVector<ProfileSyncServiceHarness> clients_;
362 363
363 // A set of objects to listen for commit activity and broadcast notifications 364 // A set of objects to listen for commit activity and broadcast notifications
364 // of this activity to its peer sync clients. 365 // of this activity to its peer sync clients.
365 ScopedVector<P2PInvalidationForwarder> invalidation_forwarders_; 366 ScopedVector<P2PInvalidationForwarder> invalidation_forwarders_;
366 367
368 // A set of objects to listen for commit activity and broadcast refresh
369 // notifications of this activity to its peer sync clients.
370 ScopedVector<P2PSyncRefresher> sync_refreshers_;
371
367 // Collection of pointers to FakeServerInvalidation objects for each profile. 372 // Collection of pointers to FakeServerInvalidation objects for each profile.
368 std::vector<fake_server::FakeServerInvalidationService*> 373 std::vector<fake_server::FakeServerInvalidationService*>
369 fake_server_invalidation_services_; 374 fake_server_invalidation_services_;
370 375
371 // Sync profile against which changes to individual profiles are verified. We 376 // Sync profile against which changes to individual profiles are verified. We
372 // don't need a corresponding verifier sync client because the contents of the 377 // don't need a corresponding verifier sync client because the contents of the
373 // verifier profile are strictly local, and are not meant to be synced. 378 // verifier profile are strictly local, and are not meant to be synced.
374 Profile* verifier_; 379 Profile* verifier_;
375 380
376 // Indicates whether changes to a profile should also change the verifier 381 // Indicates whether changes to a profile should also change the verifier
(...skipping 15 matching lines...) Expand all
392 // Fake URLFetcher factory used to mock out GAIA signin. 397 // Fake URLFetcher factory used to mock out GAIA signin.
393 scoped_ptr<net::FakeURLFetcherFactory> fake_factory_; 398 scoped_ptr<net::FakeURLFetcherFactory> fake_factory_;
394 399
395 // The URLFetcherImplFactory instance used to instantiate |fake_factory_|. 400 // The URLFetcherImplFactory instance used to instantiate |fake_factory_|.
396 scoped_ptr<net::URLFetcherImplFactory> factory_; 401 scoped_ptr<net::URLFetcherImplFactory> factory_;
397 402
398 DISALLOW_COPY_AND_ASSIGN(SyncTest); 403 DISALLOW_COPY_AND_ASSIGN(SyncTest);
399 }; 404 };
400 405
401 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_ 406 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698