summaryrefslogtreecommitdiffstats
path: root/content/test/test_browser_thread.cc
diff options
context:
space:
mode:
Diffstat (limited to 'content/test/test_browser_thread.cc')
-rw-r--r--content/test/test_browser_thread.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/content/test/test_browser_thread.cc b/content/test/test_browser_thread.cc
index 9224726..ed8d02c 100644
--- a/content/test/test_browser_thread.cc
+++ b/content/test/test_browser_thread.cc
@@ -7,6 +7,7 @@
#include "base/message_loop.h"
#include "base/threading/thread.h"
#include "content/browser/browser_thread_impl.h"
+#include "content/browser/notification_service_impl.h"
namespace content {
@@ -14,7 +15,8 @@ namespace content {
class TestBrowserThreadImpl : public BrowserThreadImpl {
public:
explicit TestBrowserThreadImpl(BrowserThread::ID identifier)
- : BrowserThreadImpl(identifier) {
+ : BrowserThreadImpl(identifier),
+ notification_service_(NULL) {
}
TestBrowserThreadImpl(BrowserThread::ID identifier,
@@ -30,7 +32,19 @@ class TestBrowserThreadImpl : public BrowserThreadImpl {
Thread::set_message_loop(loop);
}
+ virtual void Init() OVERRIDE {
+ notification_service_ = new NotificationServiceImpl;
+ notification_service_ = NULL;
+ BrowserThreadImpl::Init();
+ }
+
+ virtual void CleanUp() OVERRIDE {
+ delete notification_service_;
+ BrowserThreadImpl::CleanUp();
+ }
+
private:
+ NotificationService* notification_service_;
DISALLOW_COPY_AND_ASSIGN(TestBrowserThreadImpl);
};