OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/google_service_auth_error.h" |
| 6 #include "chrome/browser/profile.h" |
| 7 #include "chrome/test/live_sync/live_sync_test.h" |
| 8 #include "chrome/test/live_sync/profile_sync_service_test_harness.h" |
| 9 #include "testing/gmock/include/gmock/gmock.h" |
| 10 |
| 11 class OfflineSyncTest : public LiveSyncTest { |
| 12 public: |
| 13 OfflineSyncTest() : LiveSyncTest(LiveSyncTest::SINGLE_CLIENT) {} |
| 14 |
| 15 private: |
| 16 DISALLOW_COPY_AND_ASSIGN(OfflineSyncTest); |
| 17 }; |
| 18 |
| 19 IN_PROC_BROWSER_TEST_F(OfflineSyncTest, DISABLED_OfflineStart) { |
| 20 ASSERT_TRUE(SetupClients()) << "SetupClients() failed."; |
| 21 DisableNetwork(GetProfile(0)); |
| 22 |
| 23 EXPECT_FALSE(GetClient(0)->SetupSync()); |
| 24 EXPECT_EQ(GoogleServiceAuthError::CONNECTION_FAILED, |
| 25 GetClient(0)->service()->GetAuthError().state()); |
| 26 |
| 27 EnableNetwork(GetProfile(0)); |
| 28 EXPECT_TRUE(GetClient(0)->RetryAuthentication()); |
| 29 } |
OLD | NEW |