summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/password_manager/password_store_default_unittest.cc9
-rw-r--r--chrome/browser/password_manager/password_store_x_unittest.cc6
-rw-r--r--chrome/browser/policy/device_management_policy_provider_unittest.cc4
-rw-r--r--chrome/chrome_tests.gypi2
-rw-r--r--chrome/test/mock_notification_observer.h22
5 files changed, 11 insertions, 32 deletions
diff --git a/chrome/browser/password_manager/password_store_default_unittest.cc b/chrome/browser/password_manager/password_store_default_unittest.cc
index 43bed39..eb8f030 100644
--- a/chrome/browser/password_manager/password_store_default_unittest.cc
+++ b/chrome/browser/password_manager/password_store_default_unittest.cc
@@ -14,9 +14,10 @@
#include "chrome/browser/password_manager/password_form_data.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/webdata/web_data_service.h"
-#include "chrome/common/notification_service.h"
+#include "chrome/common/notification_details.h"
+#include "chrome/common/notification_observer_mock.h"
+#include "chrome/common/notification_source.h"
#include "chrome/common/pref_names.h"
-#include "chrome/test/mock_notification_observer.h"
#include "chrome/test/signaling_task.h"
#include "chrome/test/testing_profile.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -69,7 +70,7 @@ class DBThreadObserverHelper :
registrar_.RemoveAll();
}
- MockNotificationObserver& observer() {
+ NotificationObserverMock& observer() {
return observer_;
}
@@ -86,7 +87,7 @@ class DBThreadObserverHelper :
WaitableEvent done_event_;
NotificationRegistrar registrar_;
- MockNotificationObserver observer_;
+ NotificationObserverMock observer_;
};
} // anonymous namespace
diff --git a/chrome/browser/password_manager/password_store_x_unittest.cc b/chrome/browser/password_manager/password_store_x_unittest.cc
index 8379600..eb9f5b3 100644
--- a/chrome/browser/password_manager/password_store_x_unittest.cc
+++ b/chrome/browser/password_manager/password_store_x_unittest.cc
@@ -12,9 +12,9 @@
#include "chrome/browser/password_manager/password_store_change.h"
#include "chrome/browser/password_manager/password_store_x.h"
#include "chrome/browser/webdata/web_data_service.h"
+#include "chrome/common/notification_observer_mock.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/pref_names.h"
-#include "chrome/test/mock_notification_observer.h"
#include "chrome/test/signaling_task.h"
#include "chrome/test/testing_profile.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -67,7 +67,7 @@ class DBThreadObserverHelper
registrar_.RemoveAll();
}
- MockNotificationObserver& observer() {
+ NotificationObserverMock& observer() {
return observer_;
}
@@ -84,7 +84,7 @@ class DBThreadObserverHelper
WaitableEvent done_event_;
NotificationRegistrar registrar_;
- MockNotificationObserver observer_;
+ NotificationObserverMock observer_;
};
class FailingBackend : public PasswordStoreX::NativeBackend {
diff --git a/chrome/browser/policy/device_management_policy_provider_unittest.cc b/chrome/browser/policy/device_management_policy_provider_unittest.cc
index 3269531..3d85397 100644
--- a/chrome/browser/policy/device_management_policy_provider_unittest.cc
+++ b/chrome/browser/policy/device_management_policy_provider_unittest.cc
@@ -13,9 +13,9 @@
#include "chrome/browser/policy/mock_configuration_policy_store.h"
#include "chrome/browser/policy/mock_device_management_backend.h"
#include "chrome/common/net/gaia/gaia_constants.h"
+#include "chrome/common/notification_observer_mock.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/policy_constants.h"
-#include "chrome/test/mock_notification_observer.h"
#include "chrome/test/testing_device_token_fetcher.h"
#include "chrome/test/testing_profile.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -193,7 +193,7 @@ TEST_F(DeviceManagementPolicyProviderTest, SecondProvide) {
// When policy is successfully fetched from the device management server, it
// should force a policy refresh.
TEST_F(DeviceManagementPolicyProviderTest, FetchTriggersRefresh) {
- MockNotificationObserver observer;
+ NotificationObserverMock observer;
NotificationRegistrar registrar;
registrar.Add(&observer,
NotificationType::POLICY_CHANGED,
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index 6289d10..c30b7ba 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -77,6 +77,7 @@
'browser/renderer_host/test/test_render_view_host.h',
'browser/tab_contents/test_tab_contents.cc',
'browser/tab_contents/test_tab_contents.h',
+ 'common/notification_observer_mock.h',
'common/ipc_test_sink.cc',
'common/ipc_test_sink.h',
'renderer/mock_keyboard.cc',
@@ -1658,7 +1659,6 @@
'test/file_test_utils.h',
'test/menu_model_test.cc',
'test/menu_model_test.h',
- 'test/mock_notification_observer.h',
'test/render_view_test.cc',
'test/render_view_test.h',
'test/sync/test_http_bridge_factory.h',
diff --git a/chrome/test/mock_notification_observer.h b/chrome/test/mock_notification_observer.h
deleted file mode 100644
index 71a7d55..0000000
--- a/chrome/test/mock_notification_observer.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_TEST_MOCK_NOTIFICATION_OBSERVER_H_
-#define CHROME_TEST_MOCK_NOTIFICATION_OBSERVER_H_
-#pragma once
-
-#include "chrome/common/notification_observer.h"
-#include "chrome/common/notification_details.h"
-#include "chrome/common/notification_service.h"
-#include "chrome/common/notification_type.h"
-#include "testing/gmock/include/gmock/gmock.h"
-
-class MockNotificationObserver : public NotificationObserver {
- public:
- MOCK_METHOD3(Observe, void(NotificationType,
- const NotificationSource&,
- const NotificationDetails&));
-};
-
-#endif // CHROME_TEST_MOCK_NOTIFICATION_OBSERVER_H_