OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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/location.h" | 5 #include "base/location.h" |
6 #include "base/run_loop.h" | 6 #include "base/run_loop.h" |
7 #include "base/single_thread_task_runner.h" | 7 #include "base/single_thread_task_runner.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "base/synchronization/waitable_event.h" | 9 #include "base/synchronization/waitable_event.h" |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
12 #include "chrome/browser/sync/profile_sync_service.h" | |
13 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" | 12 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" |
14 #include "chrome/browser/sync/test/integration/single_client_status_change_check
er.h" | 13 #include "chrome/browser/sync/test/integration/single_client_status_change_check
er.h" |
15 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h" | 14 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h" |
16 #include "chrome/browser/sync/test/integration/sync_test.h" | 15 #include "chrome/browser/sync/test/integration/sync_test.h" |
| 16 #include "components/browser_sync/browser/profile_sync_service.h" |
17 #include "content/public/browser/browser_thread.h" | 17 #include "content/public/browser/browser_thread.h" |
18 #include "sync/syncable/directory.h" | 18 #include "sync/syncable/directory.h" |
19 #include "sync/test/directory_backing_store_corruption_testing.h" | 19 #include "sync/test/directory_backing_store_corruption_testing.h" |
20 #include "url/gurl.h" | 20 #include "url/gurl.h" |
21 | 21 |
22 using content::BrowserThread; | 22 using content::BrowserThread; |
23 using sync_integration_test_util::AwaitCommitActivityCompletion; | 23 using sync_integration_test_util::AwaitCommitActivityCompletion; |
24 using syncer::syncable::corruption_testing::kNumEntriesRequiredForCorruption; | 24 using syncer::syncable::corruption_testing::kNumEntriesRequiredForCorruption; |
25 using syncer::syncable::corruption_testing::CorruptDatabase; | 25 using syncer::syncable::corruption_testing::CorruptDatabase; |
26 | 26 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 SyncUnrecoverableErrorChecker checker(sync_service); | 129 SyncUnrecoverableErrorChecker checker(sync_service); |
130 checker.Wait(); | 130 checker.Wait(); |
131 ASSERT_TRUE(!checker.TimedOut()); | 131 ASSERT_TRUE(!checker.TimedOut()); |
132 ASSERT_TRUE(sync_service->HasUnrecoverableError()); | 132 ASSERT_TRUE(sync_service->HasUnrecoverableError()); |
133 | 133 |
134 // Wait until the sync loop has processed any existing tasks and see that the | 134 // Wait until the sync loop has processed any existing tasks and see that the |
135 // directory no longer exists. | 135 // directory no longer exists. |
136 ASSERT_TRUE(WaitForExistingTasksOnLoop(sync_loop)); | 136 ASSERT_TRUE(WaitForExistingTasksOnLoop(sync_loop)); |
137 ASSERT_FALSE(base::DirectoryExists(directory_path)); | 137 ASSERT_FALSE(base::DirectoryExists(directory_path)); |
138 } | 138 } |
OLD | NEW |