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

Unified Diff: chrome/browser/extensions/app_notify_channel_setup_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
Index: chrome/browser/extensions/app_notify_channel_setup_unittest.cc
diff --git a/chrome/browser/extensions/app_notify_channel_setup_unittest.cc b/chrome/browser/extensions/app_notify_channel_setup_unittest.cc
index 6407243bc104655708af4f4c80d11d7107cdbfa5..dcfa45f80a9e39caaac7f67a2aa3bfd4904d4792 100644
--- a/chrome/browser/extensions/app_notify_channel_setup_unittest.cc
+++ b/chrome/browser/extensions/app_notify_channel_setup_unittest.cc
@@ -7,6 +7,7 @@
#include "base/compiler_specific.h"
#include "base/memory/weak_ptr.h"
#include "base/message_loop.h"
+#include "base/synchronization/waitable_event.h"
#include "chrome/browser/extensions/app_notify_channel_setup.h"
#include "chrome/browser/extensions/app_notify_channel_ui.h"
#include "chrome/browser/signin/token_service_factory.h"
@@ -172,6 +173,7 @@ class TestUI : public AppNotifyChannelUI {
class AppNotifyChannelSetupTest : public testing::Test {
public:
AppNotifyChannelSetupTest() : ui_thread_(BrowserThread::UI, &message_loop_),
+ db_thread_(BrowserThread::DB),
ui_(new TestUI()) {
}
@@ -233,9 +235,24 @@ class AppNotifyChannelSetupTest : public testing::Test {
delegate_.ExpectWasCalled(expected_code, expected_error);
}
+ virtual void SetUp() OVERRIDE {
+ db_thread_.Start();
+ }
+
+ virtual void TearDown() OVERRIDE {
+ // 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();
+ }
+
protected:
MessageLoop message_loop_;
content::TestBrowserThread ui_thread_;
+ content::TestBrowserThread db_thread_;
TestProfile profile_;
TestDelegate delegate_;
scoped_ptr<TestUI> ui_;
« no previous file with comments | « chrome/browser/browsing_data_remover.cc ('k') | chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698