#include "chrome/common/pref_names.h"
#include "chrome/test/base/testing_pref_service_syncable.h"
#include "chrome/test/base/testing_profile.h"
-#include "components/user_prefs/pref_registry_syncable.h"
+#include "components/pref_registry/pref_registry_syncable.h"
#include "sync/api/fake_sync_change_processor.h"
#include "sync/api/sync_error_factory_mock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/message_center/fake_message_center.h"
#include "ui/message_center/notification.h"
-const char kChromeNowExtensionID[] = "pafkbggdmjlpgkdkcbjmhmfcdpncadgh";
-
class MockMessageCenter : public message_center::FakeMessageCenter {
public:
MockMessageCenter()
}
// message_center::FakeMessageCenter Overrides
- virtual bool HasNotification(const std::string& id) OVERRIDE {
- return last_notification.get() && (last_notification->id() == id);
+ virtual message_center::Notification* FindVisibleNotificationById(
+ const std::string& id) OVERRIDE {
+ if (last_notification.get() && last_notification->id() == id)
+ return last_notification.get();
+ return NULL;
}
virtual void AddNotification(
new base::ThreadTaskRunnerHandle(task_runner_));
profile_.reset(new TestingProfile());
delegate_ = new WelcomeNotificationDelegate();
- welcome_notification_ = ExtensionWelcomeNotification::Create(
- kChromeNowExtensionID, profile_.get(), delegate_);
+ welcome_notification_.reset(
+ ExtensionWelcomeNotification::Create(profile_.get(), delegate_));
}
virtual void TearDown() {
void ShowChromeNowNotification() const {
ShowNotification(
"ChromeNowNotification",
- message_center::NotifierId(message_center::NotifierId::APPLICATION,
- kChromeNowExtensionID));
+ message_center::NotifierId(
+ message_center::NotifierId::APPLICATION,
+ ExtensionWelcomeNotification::kChromeNowExtensionID));
}
void ShowRegularNotification() const {