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

Unified Diff: chrome/test/live_sync/offline_sync_test.cc

Issue 3078031: Simple offline startup integration test. (Closed)
Patch Set: Disable test. Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/live_sync/live_sync_test.cc ('k') | chrome/test/live_sync/profile_sync_service_test_harness.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/live_sync/offline_sync_test.cc
diff --git a/chrome/test/live_sync/offline_sync_test.cc b/chrome/test/live_sync/offline_sync_test.cc
new file mode 100644
index 0000000000000000000000000000000000000000..79f66169067d1cd63e9eb85fd814a6e49110728f
--- /dev/null
+++ b/chrome/test/live_sync/offline_sync_test.cc
@@ -0,0 +1,29 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/google_service_auth_error.h"
+#include "chrome/browser/profile.h"
+#include "chrome/test/live_sync/live_sync_test.h"
+#include "chrome/test/live_sync/profile_sync_service_test_harness.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+class OfflineSyncTest : public LiveSyncTest {
+ public:
+ OfflineSyncTest() : LiveSyncTest(LiveSyncTest::SINGLE_CLIENT) {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OfflineSyncTest);
+};
+
+IN_PROC_BROWSER_TEST_F(OfflineSyncTest, DISABLED_OfflineStart) {
+ ASSERT_TRUE(SetupClients()) << "SetupClients() failed.";
+ DisableNetwork(GetProfile(0));
+
+ EXPECT_FALSE(GetClient(0)->SetupSync());
+ EXPECT_EQ(GoogleServiceAuthError::CONNECTION_FAILED,
+ GetClient(0)->service()->GetAuthError().state());
+
+ EnableNetwork(GetProfile(0));
+ EXPECT_TRUE(GetClient(0)->RetryAuthentication());
+}
« no previous file with comments | « chrome/test/live_sync/live_sync_test.cc ('k') | chrome/test/live_sync/profile_sync_service_test_harness.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698