Index: media/base/test_helpers.h |
diff --git a/media/base/test_helpers.h b/media/base/test_helpers.h |
index 8dc38958f5d2a0605b435d9f599e20bb17fd8ab5..b5c14b8be0063f5205a35758c742f20d85d5cd83 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 |
+// 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 { |
+ public: |
+ MatchingCallbackVerifier(); |
+ ~MatchingCallbackVerifier(); |
+ void A(); |
ddorwin
2014/08/08 21:15:26
nit: I wonder if this should be "RecordACalled" or
jrummell
2014/08/08 23:39:59
Done.
|
+ void B(); |
+ |
+ private: |
+ bool expecting_B_; |
ddorwin
2014/08/08 21:15:26
nit: 'b'
jrummell
2014/08/08 23:39:59
Done.
|
+}; |
+ |
} // namespace media |
#endif // MEDIA_BASE_TEST_HELPERS_H_ |