Chromium Code Reviews| 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_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 #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" |
| 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 "chrome/browser/sync/syncable/model_type.h" | 19 #include "chrome/browser/sync/syncable/model_type.h" |
| 20 #include "chrome/browser/sync/protocol/sync_protocol_error.h" | |
|
Raghu Simha
2011/09/16 04:01:02
Alphabetize includes.
lipalani1
2011/09/19 18:59:13
Done.
| |
| 20 #include "net/base/mock_host_resolver.h" | 21 #include "net/base/mock_host_resolver.h" |
| 21 #include "net/test/test_server.h" | 22 #include "net/test/test_server.h" |
| 22 | 23 |
| 23 class CommandLine; | 24 class CommandLine; |
| 24 class Profile; | 25 class Profile; |
| 25 class ProfileSyncServiceHarness; | 26 class ProfileSyncServiceHarness; |
| 26 class FakeURLFetcherFactory; | 27 class FakeURLFetcherFactory; |
| 27 class URLFetcherFactory; | 28 class URLFetcherFactory; |
| 28 | 29 |
| 29 namespace net { | 30 namespace net { |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 166 void TriggerMigrationDoneError(const syncable::ModelTypeSet& model_types); | 167 void TriggerMigrationDoneError(const syncable::ModelTypeSet& model_types); |
| 167 | 168 |
| 168 // Triggers the server to set its birthday to a random value thereby | 169 // Triggers the server to set its birthday to a random value thereby |
| 169 // the server would return a birthday error on next sync. | 170 // the server would return a birthday error on next sync. |
| 170 void TriggerBirthdayError(); | 171 void TriggerBirthdayError(); |
| 171 | 172 |
| 172 // Triggers a transient error on the server. Note the server will stay in | 173 // Triggers a transient error on the server. Note the server will stay in |
| 173 // this state until shut down. | 174 // this state until shut down. |
| 174 void TriggerTransientError(); | 175 void TriggerTransientError(); |
| 175 | 176 |
| 177 // Triggers a sync error on the server. | |
| 178 void TriggerSyncError(const browser_sync::SyncProtocolError& error); | |
| 179 | |
| 176 // Triggers setting the sync_tabs field of the nigori node. | 180 // Triggers setting the sync_tabs field of the nigori node. |
| 177 void TriggerSetSyncTabs(); | 181 void TriggerSetSyncTabs(); |
| 178 | 182 |
| 179 protected: | 183 protected: |
| 180 // Add custom switches needed for running the test. | 184 // Add custom switches needed for running the test. |
| 181 virtual void AddTestSwitches(CommandLine* cl); | 185 virtual void AddTestSwitches(CommandLine* cl); |
| 182 | 186 |
| 183 // Append the command line switches to enable experimental types that aren't | 187 // Append the command line switches to enable experimental types that aren't |
| 184 // on by default yet. | 188 // on by default yet. |
| 185 virtual void AddOptionalTypesToCommandLine(CommandLine* cl); | 189 virtual void AddOptionalTypesToCommandLine(CommandLine* cl); |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 308 | 312 |
| 309 // The URLFetcherFactory instance used to instantiate |fake_factory_|. | 313 // The URLFetcherFactory instance used to instantiate |fake_factory_|. |
| 310 scoped_ptr<URLFetcherFactory> factory_; | 314 scoped_ptr<URLFetcherFactory> factory_; |
| 311 | 315 |
| 312 DISALLOW_COPY_AND_ASSIGN(SyncTest); | 316 DISALLOW_COPY_AND_ASSIGN(SyncTest); |
| 313 }; | 317 }; |
| 314 | 318 |
| 315 DISABLE_RUNNABLE_METHOD_REFCOUNT(SyncTest); | 319 DISABLE_RUNNABLE_METHOD_REFCOUNT(SyncTest); |
| 316 | 320 |
| 317 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_ | 321 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_ |
| OLD | NEW |