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

Unified Diff: chrome/browser/media/router/test_helper.h

Issue 1259333004: [MediaRouter]Wires up issue manager in MediaRouterMojoImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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: 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 ba5a47787e8b624aedce8884dd3ec92ac5c56e6a..4726ea7bf43ad5dfb5538750f2725370a04b2c1d 100644
--- a/chrome/browser/media/router/test_helper.h
+++ b/chrome/browser/media/router/test_helper.h
@@ -8,6 +8,7 @@
#include <string>
#include <vector>
+#include "chrome/browser/media/router/issues_observer.h"
#include "chrome/browser/media/router/media_router.mojom.h"
#include "chrome/browser/media/router/media_router_mojo_impl.h"
#include "chrome/browser/media/router/media_routes_observer.h"
@@ -36,6 +37,48 @@ MATCHER_P(SequenceEquals, other, "") {
return true;
}
+// Matcher for checking all fields in Issue objects except the ID.
+MATCHER_P(EqualsIssue, other, "") {
+ if (arg.title() != other.title())
+ return false;
+
+ if (arg.message() != other.message())
+ return false;
+
+ if (!arg.default_action().Equals(other.default_action()))
+ return false;
+
+ if (arg.secondary_actions().size() != other.secondary_actions().size())
+ return false;
+
+ for (size_t i = 0; i < arg.secondary_actions().size(); ++i) {
+ if (!arg.secondary_actions()[i].Equals(other.secondary_actions()[i]))
+ return false;
+ }
+
+ if (arg.route_id() != other.route_id())
+ return false;
+
+ if (arg.severity() != other.severity())
+ return false;
+
+ if (arg.is_blocking() != other.is_blocking())
+ return false;
+
+ if (arg.help_url() != other.help_url())
+ return false;
+
+ return true;
+}
+
+class MockIssuesObserver : public IssuesObserver {
+ public:
+ explicit MockIssuesObserver(MediaRouter* router);
+ ~MockIssuesObserver() override;
+
+ MOCK_METHOD1(OnIssueUpdated, void(const Issue* issue));
+};
+
class MockMediaRouteProvider : public interfaces::MediaRouteProvider {
public:
MockMediaRouteProvider();
« no previous file with comments | « chrome/browser/media/router/media_router_mojo_impl_unittest.cc ('k') | chrome/browser/media/router/test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698