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

Side by Side Diff: chrome/browser/media/router/test_helper.h

Issue 2176613003: [Media Router] Clean up issues related code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_TEST_HELPER_H_ 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_TEST_HELPER_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_TEST_HELPER_H_ 6 #define CHROME_BROWSER_MEDIA_ROUTER_TEST_HELPER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 29 matching lines...) Expand all
40 } 40 }
41 41
42 // Matcher for checking all fields in Issue objects except the ID. 42 // Matcher for checking all fields in Issue objects except the ID.
43 MATCHER_P(EqualsIssue, other, "") { 43 MATCHER_P(EqualsIssue, other, "") {
44 if (arg.title() != other.title()) 44 if (arg.title() != other.title())
45 return false; 45 return false;
46 46
47 if (arg.message() != other.message()) 47 if (arg.message() != other.message())
48 return false; 48 return false;
49 49
50 if (!arg.default_action().Equals(other.default_action())) 50 if (arg.default_action() != other.default_action())
51 return false; 51 return false;
52 52
53 if (arg.secondary_actions().size() != other.secondary_actions().size()) 53 if (arg.secondary_actions() != other.secondary_actions())
54 return false; 54 return false;
55 55
56 for (size_t i = 0; i < arg.secondary_actions().size(); ++i) {
57 if (!arg.secondary_actions()[i].Equals(other.secondary_actions()[i]))
58 return false;
59 }
60
61 if (arg.route_id() != other.route_id()) 56 if (arg.route_id() != other.route_id())
62 return false; 57 return false;
63 58
64 if (arg.severity() != other.severity()) 59 if (arg.severity() != other.severity())
65 return false; 60 return false;
66 61
67 if (arg.is_blocking() != other.is_blocking()) 62 if (arg.IsBlocking() != other.IsBlocking())
68 return false; 63 return false;
69 64
70 if (arg.help_page_id() != other.help_page_id()) 65 if (arg.help_page_id() != other.help_page_id())
71 return false; 66 return false;
72 67
73 return true; 68 return true;
74 } 69 }
75 70
76 MATCHER_P(IssueTitleEquals, title, "") { 71 MATCHER_P(IssueTitleEquals, title, "") {
77 return arg.title() == title; 72 return arg.title() == title;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 public: 109 public:
115 MockPresentationConnectionStateChangedCallback(); 110 MockPresentationConnectionStateChangedCallback();
116 ~MockPresentationConnectionStateChangedCallback(); 111 ~MockPresentationConnectionStateChangedCallback();
117 MOCK_METHOD1(Run, 112 MOCK_METHOD1(Run,
118 void(const content::PresentationConnectionStateChangeInfo&)); 113 void(const content::PresentationConnectionStateChangeInfo&));
119 }; 114 };
120 115
121 } // namespace media_router 116 } // namespace media_router
122 117
123 #endif // CHROME_BROWSER_MEDIA_ROUTER_TEST_HELPER_H_ 118 #endif // CHROME_BROWSER_MEDIA_ROUTER_TEST_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698