Index: chrome/test/base/testing_profile.cc |
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc |
index 3d9511da7f89dafb7b66d242aaf93e12a123a89b..f0240b500a16200fb7fb8ab539c6f705a38d6a24 100644 |
--- a/chrome/test/base/testing_profile.cc |
+++ b/chrome/test/base/testing_profile.cc |
@@ -283,6 +283,11 @@ void TestingProfile::CreateTempProfileDir() { |
} |
void TestingProfile::Init() { |
+ // If threads have been initialized, we should be on the UI thread. |
+ DCHECK( |
+ !content::BrowserThread::IsWellKnownThread(content::BrowserThread::UI) || |
+ content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
+ |
// Normally this would happen during browser startup, but for tests |
// we need to trigger creation of Profile-related services. |
ChromeBrowserMainExtraPartsProfiles:: |