| 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 #include "base/rand_util.h" | 5 #include "base/rand_util.h" |
| 6 #include "chrome/browser/profiles/profile.h" | 6 #include "chrome/browser/profiles/profile.h" |
| 7 #include "chrome/browser/sync/profile_sync_service_harness.h" | 7 #include "chrome/browser/sync/profile_sync_service_harness.h" |
| 8 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" | 8 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" |
| 9 #include "chrome/browser/sync/test/integration/sync_test.h" | 9 #include "chrome/browser/sync/test/integration/sync_test.h" |
| 10 #include "sync/sessions/session_state.h" | 10 #include "sync/sessions/session_state.h" |
| (...skipping 1890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1901 << rand_pos; | 1901 << rand_pos; |
| 1902 Move(0, node, node->parent(), rand_pos); | 1902 Move(0, node, node->parent(), rand_pos); |
| 1903 } | 1903 } |
| 1904 | 1904 |
| 1905 ASSERT_TRUE(AwaitQuiescence()); | 1905 ASSERT_TRUE(AwaitQuiescence()); |
| 1906 ASSERT_TRUE(AllModelsMatch()); | 1906 ASSERT_TRUE(AllModelsMatch()); |
| 1907 } | 1907 } |
| 1908 | 1908 |
| 1909 // Restart the sync service on one client and make sure all data is synced when | 1909 // Restart the sync service on one client and make sure all data is synced when |
| 1910 // the service restarts. | 1910 // the service restarts. |
| 1911 IN_PROC_BROWSER_TEST_F(TwoClientBookmarksSyncTest, RestartSyncService) { | 1911 IN_PROC_BROWSER_TEST_F(TwoClientBookmarksSyncTest, |
| 1912 DISABLED_RestartSyncService) { |
| 1912 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; | 1913 ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; |
| 1913 | 1914 |
| 1914 ASSERT_TRUE(AddURL(0, L"Google", GURL("http://www.google.com"))); | 1915 ASSERT_TRUE(AddURL(0, L"Google", GURL("http://www.google.com"))); |
| 1915 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); | 1916 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); |
| 1916 ASSERT_TRUE(AllModelsMatchVerifier()); | 1917 ASSERT_TRUE(AllModelsMatchVerifier()); |
| 1917 | 1918 |
| 1918 RestartSyncService(0); | 1919 RestartSyncService(0); |
| 1919 ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion("Restarted sync.")); | 1920 ASSERT_TRUE(GetClient(0)->AwaitFullSyncCompletion("Restarted sync.")); |
| 1920 ASSERT_TRUE(AllModelsMatchVerifier()); | 1921 ASSERT_TRUE(AllModelsMatchVerifier()); |
| 1921 ASSERT_EQ(ProfileSyncService::Status::READY, | 1922 ASSERT_EQ(ProfileSyncService::Status::READY, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1940 | 1941 |
| 1941 // Now add a bookmark within the Synced Bookmarks folder and ensure it syncs | 1942 // Now add a bookmark within the Synced Bookmarks folder and ensure it syncs |
| 1942 // over. | 1943 // over. |
| 1943 const BookmarkNode* synced_bookmarks = GetSyncedBookmarksNode(0); | 1944 const BookmarkNode* synced_bookmarks = GetSyncedBookmarksNode(0); |
| 1944 ASSERT_TRUE(synced_bookmarks); | 1945 ASSERT_TRUE(synced_bookmarks); |
| 1945 ASSERT_TRUE(AddURL(0, synced_bookmarks, 0, L"Google2", | 1946 ASSERT_TRUE(AddURL(0, synced_bookmarks, 0, L"Google2", |
| 1946 GURL("http://www.google2.com"))); | 1947 GURL("http://www.google2.com"))); |
| 1947 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); | 1948 ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1))); |
| 1948 ASSERT_TRUE(AllModelsMatch()); | 1949 ASSERT_TRUE(AllModelsMatch()); |
| 1949 } | 1950 } |
| OLD | NEW |