Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Unified Diff: jingle/notifier/listener/mediator_thread_mock.h

Issue 6523032: Even more test cleanup. Some fixes to non-test code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: jingle/notifier/listener/mediator_thread_mock.h
diff --git a/jingle/notifier/listener/mediator_thread_mock.h b/jingle/notifier/listener/mediator_thread_mock.h
index 99b880e2759d519de63ae1e02e395bd64802c0a2..98faed6d670ce1f68d035114193c85e1e60b28dc 100644
--- a/jingle/notifier/listener/mediator_thread_mock.h
+++ b/jingle/notifier/listener/mediator_thread_mock.h
@@ -13,78 +13,40 @@
#include <vector>
#include "jingle/notifier/listener/mediator_thread.h"
-#include "talk/xmpp/xmppclientsettings.h"
+
+namespace buzz {
+class XmppClientSettings;
+}
namespace notifier {
class MockMediatorThread : public MediatorThread {
public:
- MockMediatorThread() : observer_(NULL) {
- Reset();
- }
+ MockMediatorThread();
- virtual ~MockMediatorThread() {}
+ virtual ~MockMediatorThread();
- void Reset() {
- login_calls = 0;
- logout_calls = 0;
- start_calls = 0;
- subscribe_calls = 0;
- listen_calls = 0;
- send_calls = 0;
- }
+ void Reset();
- virtual void AddObserver(Observer* observer) {
- observer_ = observer;
- }
+ virtual void AddObserver(Observer* observer);
- virtual void RemoveObserver(Observer* observer) {
- observer_ = NULL;
- }
+ virtual void RemoveObserver(Observer* observer);
// Overridden from MediatorThread
- virtual void Login(const buzz::XmppClientSettings& settings) {
- login_calls++;
- if (observer_) {
- observer_->OnConnectionStateChange(true);
- }
- }
-
- virtual void Logout() {
- logout_calls++;
- if (observer_) {
- observer_->OnConnectionStateChange(false);
- }
- }
-
- virtual void Start() {
- start_calls++;
- }
+ virtual void Login(const buzz::XmppClientSettings& settings);
+
+ virtual void Logout();
+
+ virtual void Start();
virtual void SubscribeForUpdates(
- const std::vector<std::string>& subscribed_services_list) {
- subscribe_calls++;
- if (observer_) {
- observer_->OnSubscriptionStateChange(true);
- }
- }
-
- virtual void ListenForUpdates() {
- listen_calls++;
- }
-
- virtual void SendNotification(const OutgoingNotificationData &) {
- send_calls++;
- if (observer_) {
- observer_->OnOutgoingNotification();
- }
- }
-
- void ReceiveNotification(const IncomingNotificationData& data) {
- if (observer_) {
- observer_->OnIncomingNotification(data);
- }
- }
+ const std::vector<std::string>& subscribed_services_list);
+
+ virtual void ListenForUpdates();
+
+ virtual void SendNotification(const OutgoingNotificationData &);
+
+ void ReceiveNotification(const IncomingNotificationData& data);
Observer* observer_;
// Intneral State
Nico 2011/02/15 21:25:37 *Internal

Powered by Google App Engine
This is Rietveld 408576698