summaryrefslogtreecommitdiff
path: root/chrome/browser/sync/abstract_profile_sync_service_test.cc
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2013-07-24 10:36:34 +0100
committerBen Murdoch <benm@google.com>2013-07-24 10:36:34 +0100
commita3f7b4e666c476898878fa745f637129375cd889 (patch)
tree1d78b48780e4c8603c226fd88d8f4b786f00bb81 /chrome/browser/sync/abstract_profile_sync_service_test.cc
parentd4336a7d5c149891bede0c3201c8e831520067af (diff)
downloadchromium_org-a3f7b4e666c476898878fa745f637129375cd889.tar.gz
Merge from Chromium at DEPS revision r213371
This commit was generated by merge_to_master.py. Change-Id: I35a74205de4bff52a2dd6b15330f8a002a39efaf
Diffstat (limited to 'chrome/browser/sync/abstract_profile_sync_service_test.cc')
-rw-r--r--chrome/browser/sync/abstract_profile_sync_service_test.cc21
1 files changed, 8 insertions, 13 deletions
diff --git a/chrome/browser/sync/abstract_profile_sync_service_test.cc b/chrome/browser/sync/abstract_profile_sync_service_test.cc
index 1c4a9956fb..8de5c6bea9 100644
--- a/chrome/browser/sync/abstract_profile_sync_service_test.cc
+++ b/chrome/browser/sync/abstract_profile_sync_service_test.cc
@@ -7,13 +7,14 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/location.h"
+#include "base/run_loop.h"
#include "chrome/browser/sync/test_profile_sync_service.h"
+#include "content/public/test/test_utils.h"
#include "sync/internal_api/public/test/test_user_share.h"
#include "sync/internal_api/public/write_transaction.h"
#include "sync/protocol/sync.pb.h"
#include "sync/util/cryptographer.h"
-using content::BrowserThread;
using syncer::ModelType;
using syncer::UserShare;
@@ -41,10 +42,9 @@ syncer::ImmutableChangeRecordList
}
AbstractProfileSyncServiceTest::AbstractProfileSyncServiceTest()
- : ui_thread_(BrowserThread::UI, &ui_loop_),
- db_thread_(BrowserThread::DB),
- file_thread_(BrowserThread::FILE),
- io_thread_(BrowserThread::IO),
+ : thread_bundle_(content::TestBrowserThreadBundle::REAL_DB_THREAD |
+ content::TestBrowserThreadBundle::REAL_FILE_THREAD |
+ content::TestBrowserThreadBundle::REAL_IO_THREAD),
token_service_(NULL),
sync_service_(NULL) {
}
@@ -52,19 +52,14 @@ AbstractProfileSyncServiceTest::AbstractProfileSyncServiceTest()
AbstractProfileSyncServiceTest::~AbstractProfileSyncServiceTest() {}
void AbstractProfileSyncServiceTest::SetUp() {
- db_thread_.Start();
- file_thread_.Start();
- io_thread_.StartIOThread();
}
void AbstractProfileSyncServiceTest::TearDown() {
// Pump messages posted by the sync core thread (which may end up
// posting on the IO thread).
- ui_loop_.RunUntilIdle();
- io_thread_.Stop();
- file_thread_.Stop();
- db_thread_.Stop();
- ui_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
+ content::RunAllPendingInMessageLoop(content::BrowserThread::IO);
+ base::RunLoop().RunUntilIdle();
}
bool AbstractProfileSyncServiceTest::CreateRoot(ModelType model_type) {