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

Unified Diff: chrome/browser/intents/register_intent_handler_infobar_delegate_unittest.cc

Issue 10006037: Moved WebDataService to ProfileKeyedService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed compile Created 8 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
« no previous file with comments | « chrome/browser/importer/profile_writer.cc ('k') | chrome/browser/intents/web_intents_registry_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/intents/register_intent_handler_infobar_delegate_unittest.cc
diff --git a/chrome/browser/intents/register_intent_handler_infobar_delegate_unittest.cc b/chrome/browser/intents/register_intent_handler_infobar_delegate_unittest.cc
index 559a09ec14bd07822bc73268e05ae6d1c48a0ed3..008996c333afad503b2a2cacf3b26a7cdf8c7330 100644
--- a/chrome/browser/intents/register_intent_handler_infobar_delegate_unittest.cc
+++ b/chrome/browser/intents/register_intent_handler_infobar_delegate_unittest.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/synchronization/waitable_event.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/intents/register_intent_handler_infobar_delegate.h"
#include "chrome/browser/intents/web_intents_registry.h"
@@ -38,12 +39,13 @@ class RegisterIntentHandlerInfoBarDelegateTest
: public TabContentsWrapperTestHarness {
protected:
RegisterIntentHandlerInfoBarDelegateTest()
- : ui_thread_(BrowserThread::UI, MessageLoopForUI::current()) {}
+ : ui_thread_(BrowserThread::UI, MessageLoopForUI::current()),
+ db_thread_(BrowserThread::DB) {}
virtual void SetUp() {
+ db_thread_.Start();
TabContentsWrapperTestHarness::SetUp();
- profile()->CreateWebDataService(false);
web_intents_registry_ = BuildForProfile(profile());
}
@@ -51,12 +53,20 @@ class RegisterIntentHandlerInfoBarDelegateTest
web_intents_registry_ = NULL;
TabContentsWrapperTestHarness::TearDown();
+ // Schedule another task on the DB thread to notify us that it's safe to
+ // carry on with the test.
+ base::WaitableEvent done(false, false);
+ BrowserThread::PostTask(BrowserThread::DB, FROM_HERE,
+ base::Bind(&base::WaitableEvent::Signal, base::Unretained(&done)));
+ done.Wait();
+ db_thread_.Stop();
}
MockWebIntentsRegistry* web_intents_registry_;
private:
content::TestBrowserThread ui_thread_;
+ content::TestBrowserThread db_thread_;
DISALLOW_COPY_AND_ASSIGN(RegisterIntentHandlerInfoBarDelegateTest);
};
« no previous file with comments | « chrome/browser/importer/profile_writer.cc ('k') | chrome/browser/intents/web_intents_registry_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698