Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / sync / sync_error_notifier_ash_unittest.cc
index 482ae52..8215226 100644 (file)
@@ -14,7 +14,6 @@
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/webui/signin/login_ui_service.h"
 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
-#include "chrome/common/pref_names.h"
 #include "chrome/test/base/testing_browser_process.h"
 #include "chrome/test/base/testing_profile.h"
 #include "chrome/test/base/testing_profile_manager.h"
@@ -51,7 +50,7 @@ class ScreenTypeDelegateDesktop : public gfx::ScreenTypeDelegate {
   ScreenTypeDelegateDesktop() {}
   virtual ~ScreenTypeDelegateDesktop() {}
   virtual gfx::ScreenType GetScreenTypeForNativeView(
-      gfx::NativeView view) OVERRIDE {
+      gfx::NativeView view) override {
     return chrome::IsNativeViewInAsh(view) ?
         gfx::SCREEN_TYPE_ALTERNATE :
         gfx::SCREEN_TYPE_NATIVE;
@@ -65,23 +64,21 @@ class ScreenTypeDelegateDesktop : public gfx::ScreenTypeDelegate {
 class FakeLoginUIService: public LoginUIService {
  public:
   FakeLoginUIService() : LoginUIService(NULL) {}
-  virtual ~FakeLoginUIService() {}
+  ~FakeLoginUIService() override {}
 };
 
 class FakeLoginUI : public LoginUIService::LoginUI {
  public:
   FakeLoginUI() : focus_ui_call_count_(0) {}
 
-  virtual ~FakeLoginUI() {}
+  ~FakeLoginUI() override {}
 
   int focus_ui_call_count() const { return focus_ui_call_count_; }
 
  private:
   // LoginUIService::LoginUI:
-  virtual void FocusUI() OVERRIDE {
-    ++focus_ui_call_count_;
-  }
-  virtual void CloseUI() OVERRIDE {}
+  void FocusUI() override { ++focus_ui_call_count_; }
+  void CloseUI() override {}
 
   int focus_ui_call_count_;
 };
@@ -94,9 +91,9 @@ KeyedService* BuildMockLoginUIService(
 class SyncErrorNotifierTest : public AshTestBase  {
  public:
   SyncErrorNotifierTest() {}
-  virtual ~SyncErrorNotifierTest() {}
+  ~SyncErrorNotifierTest() override {}
 
-  virtual void SetUp() OVERRIDE {
+  void SetUp() override {
     profile_manager_.reset(
         new TestingProfileManager(TestingBrowserProcess::GetGlobal()));
     ASSERT_TRUE(profile_manager_->SetUp());
@@ -128,7 +125,7 @@ class SyncErrorNotifierTest : public AshTestBase  {
     notification_ui_manager_ = g_browser_process->notification_ui_manager();
   }
 
-  virtual void TearDown() OVERRIDE {
+  void TearDown() override {
     error_notifier_->Shutdown();
     service_.reset();
 #if defined(OS_WIN)
@@ -156,8 +153,8 @@ class SyncErrorNotifierTest : public AshTestBase  {
     EXPECT_EQ(is_error, error_controller_->HasError());
 
     // If there is an error we should see a notification.
-    const Notification* notification = notification_ui_manager_->
-        FindById(kNotificationId);
+    const Notification* notification = notification_ui_manager_->FindById(
+        kNotificationId, NotificationUIManager::GetProfileID(profile_));
     if (is_error) {
       ASSERT_TRUE(notification);
       ASSERT_FALSE(notification->title().empty());
@@ -193,7 +190,8 @@ class SyncErrorNotifierTest : public AshTestBase  {
 #define MAYBE_PassphraseNotification PassphraseNotification
 #endif
 TEST_F(SyncErrorNotifierTest, MAYBE_PassphraseNotification) {
-  ASSERT_FALSE(notification_ui_manager_->FindById(kNotificationId));
+  ASSERT_FALSE(notification_ui_manager_->FindById(
+      kNotificationId, NotificationUIManager::GetProfileID(profile_)));
 
   browser_sync::SyncBackendHost::Status status;
   EXPECT_CALL(*service_, QueryDetailedSyncStatus(_))