| Index: chrome/browser/services/gcm/gcm_profile_service_unittest.cc
|
| diff --git a/chrome/browser/services/gcm/gcm_profile_service_unittest.cc b/chrome/browser/services/gcm/gcm_profile_service_unittest.cc
|
| index 2ab485a2f1d747799765a696d211908c4ed47b0c..1ac5a618dc309b6f9225c5db820664b52e8b4cfd 100644
|
| --- a/chrome/browser/services/gcm/gcm_profile_service_unittest.cc
|
| +++ b/chrome/browser/services/gcm/gcm_profile_service_unittest.cc
|
| @@ -29,6 +29,8 @@
|
| #include "content/public/browser/browser_thread.h"
|
| #include "content/public/browser/notification_service.h"
|
| #include "content/public/test/test_browser_thread_bundle.h"
|
| +#include "extensions/browser/event_router.h"
|
| +#include "extensions/browser/extension_prefs.h"
|
| #include "extensions/common/extension.h"
|
| #include "extensions/common/manifest_constants.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| @@ -283,6 +285,12 @@ class GCMProfileServiceTestConsumer : public GCMProfileService::TestingDelegate{
|
| CommandLine::ForCurrentProcess(), base::FilePath(), false);
|
| extension_service_ = extension_system->Get(profile())->extension_service();
|
|
|
| + // EventRouter is needed for GcmJsEventRouter.
|
| + if (!extension_system->event_router()) {
|
| + extension_system->SetEventRouter(scoped_ptr<EventRouter>(
|
| + new EventRouter(profile(), ExtensionPrefs::Get(profile()))));
|
| + }
|
| +
|
| // Enable GCM such that tests could be run on all channels.
|
| profile()->GetPrefs()->SetBoolean(prefs::kGCMChannelEnabled, true);
|
|
|
|
|