OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE; | 224 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE; |
225 | 225 |
226 // InProcessBrowserTest override. Resets the host resolver its default | 226 // InProcessBrowserTest override. Resets the host resolver its default |
227 // behavior. | 227 // behavior. |
228 virtual void TearDownInProcessBrowserTestFixture() OVERRIDE; | 228 virtual void TearDownInProcessBrowserTestFixture() OVERRIDE; |
229 | 229 |
230 // Creates Profile, Browser and ProfileSyncServiceHarness instances for | 230 // Creates Profile, Browser and ProfileSyncServiceHarness instances for |
231 // |index|. Used by SetupClients(). | 231 // |index|. Used by SetupClients(). |
232 virtual void InitializeInstance(int index); | 232 virtual void InitializeInstance(int index); |
233 | 233 |
| 234 // Implementations of the EnableNotifications() and DisableNotifications() |
| 235 // functions defined above. |
| 236 void DisableNotificationsImpl(); |
| 237 void EnableNotificationsImpl(); |
| 238 |
234 // GAIA account used by the test case. | 239 // GAIA account used by the test case. |
235 std::string username_; | 240 std::string username_; |
236 | 241 |
237 // GAIA password used by the test case. | 242 // GAIA password used by the test case. |
238 std::string password_; | 243 std::string password_; |
239 | 244 |
240 // Locally available plain text file in which GAIA credentials are stored. | 245 // Locally available plain text file in which GAIA credentials are stored. |
241 FilePath password_file_; | 246 FilePath password_file_; |
242 | 247 |
243 private: | 248 private: |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 | 328 |
324 // Sync profile against which changes to individual profiles are verified. We | 329 // Sync profile against which changes to individual profiles are verified. We |
325 // don't need a corresponding verifier sync client because the contents of the | 330 // don't need a corresponding verifier sync client because the contents of the |
326 // verifier profile are strictly local, and are not meant to be synced. | 331 // verifier profile are strictly local, and are not meant to be synced. |
327 Profile* verifier_; | 332 Profile* verifier_; |
328 | 333 |
329 // Indicates whether changes to a profile should also change the verifier | 334 // Indicates whether changes to a profile should also change the verifier |
330 // profile or not. | 335 // profile or not. |
331 bool use_verifier_; | 336 bool use_verifier_; |
332 | 337 |
| 338 // Indicates whether or not notifications were explicitly enabled/disabled. |
| 339 // Defaults to true. |
| 340 bool notifications_enabled_; |
| 341 |
333 // Sync integration tests need to make live DNS requests for access to | 342 // Sync integration tests need to make live DNS requests for access to |
334 // GAIA and sync server URLs under google.com. We use a scoped version | 343 // GAIA and sync server URLs under google.com. We use a scoped version |
335 // to override the default resolver while the test is active. | 344 // to override the default resolver while the test is active. |
336 scoped_ptr<net::ScopedDefaultHostResolverProc> mock_host_resolver_override_; | 345 scoped_ptr<net::ScopedDefaultHostResolverProc> mock_host_resolver_override_; |
337 | 346 |
338 // Used to start and stop the local test server. | 347 // Used to start and stop the local test server. |
339 base::ProcessHandle test_server_handle_; | 348 base::ProcessHandle test_server_handle_; |
340 | 349 |
341 // Fake URLFetcher factory used to mock out GAIA signin. | 350 // Fake URLFetcher factory used to mock out GAIA signin. |
342 scoped_ptr<FakeURLFetcherFactory> fake_factory_; | 351 scoped_ptr<FakeURLFetcherFactory> fake_factory_; |
343 | 352 |
344 // The URLFetcherImplFactory instance used to instantiate |fake_factory_|. | 353 // The URLFetcherImplFactory instance used to instantiate |fake_factory_|. |
345 scoped_ptr<URLFetcherImplFactory> factory_; | 354 scoped_ptr<URLFetcherImplFactory> factory_; |
346 | 355 |
347 // Number of default entries (as determined by the existing entries at setup | 356 // Number of default entries (as determined by the existing entries at setup |
348 // time on client 0). | 357 // time on client 0). |
349 size_t number_of_default_sync_items_; | 358 size_t number_of_default_sync_items_; |
350 | 359 |
351 DISALLOW_COPY_AND_ASSIGN(SyncTest); | 360 DISALLOW_COPY_AND_ASSIGN(SyncTest); |
352 }; | 361 }; |
353 | 362 |
354 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_ | 363 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_ |
OLD | NEW |