Index: chrome/browser/media/router/test_helper.h |
diff --git a/chrome/browser/media/router/test_helper.h b/chrome/browser/media/router/test_helper.h |
index 3179d1511b3c544be3f59e2c1e9f42b2a6641aae..7a8a26de8a30105f45563b8b186ad1c206dcc487 100644 |
--- a/chrome/browser/media/router/test_helper.h |
+++ b/chrome/browser/media/router/test_helper.h |
@@ -77,6 +77,11 @@ MATCHER_P(IssueTitleEquals, title, "") { |
return arg.title() == title; |
} |
+MATCHER_P(PresentationConnectionInfoEquals, other, "") { |
+ return arg.presentation_url == other.presentation_url && |
+ arg.presentation_id == other.presentation_id; |
+} |
+ |
MATCHER_P(StateChageInfoEquals, other, "") { |
return arg.state == other.state && arg.close_reason == other.close_reason && |
arg.message == other.message; |
@@ -118,6 +123,19 @@ class MockPresentationConnectionStateChangedCallback { |
void(const content::PresentationConnectionStateChangeInfo&)); |
}; |
+class MockPresentationMessagesCallback { |
+ public: |
+ MockPresentationMessagesCallback(); |
+ ~MockPresentationMessagesCallback(); |
+ void OnMessagesReceived( |
+ const ScopedVector<content::PresentationSessionMessage>& messages, |
+ bool pass_ownership) { |
+ DoOnMessagesReceived(messages[0]->message); |
+ } |
+ MOCK_METHOD1(DoOnMessagesReceived, void(const std::string&)); |
+ MOCK_METHOD1(OnMessageSent, void(bool)); |
+}; |
+ |
} // namespace media_router |
#endif // CHROME_BROWSER_MEDIA_ROUTER_TEST_HELPER_H_ |