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

Unified Diff: chrome/browser/sync/test/integration/sync_test.cc

Issue 2835233002: Fix integration tests in src/chrome and src/extensions so that we can turn on IO thread checks wi... (Closed)
Patch Set: ready for review Created 3 years, 8 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
Index: chrome/browser/sync/test/integration/sync_test.cc
diff --git a/chrome/browser/sync/test/integration/sync_test.cc b/chrome/browser/sync/test/integration/sync_test.cc
index f2a9a28513d9aae5252f523a9de6429772dc13cd..c783c2b334c6bc6d7e0be9a1f1c844c1e92023f8 100644
--- a/chrome/browser/sync/test/integration/sync_test.cc
+++ b/chrome/browser/sync/test/integration/sync_test.cc
@@ -25,6 +25,7 @@
#include "base/synchronization/waitable_event.h"
#include "base/test/test_timeouts.h"
#include "base/threading/platform_thread.h"
+#include "base/threading/thread_restrictions.h"
#include "base/values.h"
#include "build/build_config.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
@@ -338,6 +339,7 @@ bool SyncTest::CreateGaiaAccount(const std::string& username,
}
void SyncTest::CreateProfile(int index) {
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
tmp_profile_paths_[index] = new base::ScopedTempDir();
if (UsingExternalServers() && num_clients_ > 1) {
// For multi profile UI signin, profile paths should be outside user data
@@ -504,6 +506,7 @@ void SyncTest::DisableVerifier() {
}
bool SyncTest::SetupClients() {
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
if (num_clients_ <= 0)
LOG(FATAL) << "num_clients_ incorrectly initialized.";
if (!profiles_.empty() || !browsers_.empty() || !clients_.empty())
@@ -646,6 +649,7 @@ void SyncTest::InitializeInvalidations(int index) {
}
bool SyncTest::SetupSync() {
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
// Create sync profiles and clients if they haven't already been created.
if (profiles_.empty()) {
if (!SetupClients()) {

Powered by Google App Engine
This is Rietveld 408576698