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

Unified Diff: media/base/test_helpers.h

Issue 416333011: Allow setContentDecryptionModule() to get called when setting is done. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ReportCallback Created 6 years, 4 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: media/base/test_helpers.h
diff --git a/media/base/test_helpers.h b/media/base/test_helpers.h
index 8dc38958f5d2a0605b435d9f599e20bb17fd8ab5..f0feadcd43ba8b8e56203e25dd0cadabb75aeae6 100644
--- a/media/base/test_helpers.h
+++ b/media/base/test_helpers.h
@@ -125,6 +125,20 @@ scoped_refptr<DecoderBuffer> CreateFakeVideoBufferForTest(
bool VerifyFakeVideoBufferForTest(const scoped_refptr<DecoderBuffer>& buffer,
const VideoDecoderConfig& config);
+// Used to verify that the number of calls to A() match the number of calls to
xhwang 2014/08/09 00:56:03 We are not tracking "the number of calls" since we
jrummell 2014/08/11 21:47:15 Done.
+// B() and that the calls happen in pairs (e.g. B() called after every A()
+// call). There may be any number of pairs (including 0).
+class MatchingCallbackVerifier {
xhwang 2014/08/09 00:56:03 Naming bikeshedding.. In our use case, this is rea
jrummell 2014/08/11 21:47:15 Like CallbackPairChecker.
+ public:
+ MatchingCallbackVerifier();
+ ~MatchingCallbackVerifier();
+ void RecordACalled();
+ void RecordBCalled();
+
+ private:
+ bool expecting_b_;
+};
+
} // namespace media
#endif // MEDIA_BASE_TEST_HELPERS_H_

Powered by Google App Engine
This is Rietveld 408576698