summaryrefslogtreecommitdiff
path: root/media/base/mock_demuxer_host.h
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@google.com>2012-11-14 11:43:16 +0000
committerTorne (Richard Coles) <torne@google.com>2012-11-14 11:43:16 +0000
commit5821806d5e7f356e8fa4b058a389a808ea183019 (patch)
treee19f4793aac92e2c0d9a01087019a60d6657d838 /media/base/mock_demuxer_host.h
parent8e79a8efe247f109aafd917a69e8a392961b3687 (diff)
downloadchromium_org-5821806d5e7f356e8fa4b058a389a808ea183019.tar.gz
Merge from Chromium at DEPS revision r167172
This commit was generated by merge_to_master.py. Change-Id: Ib8d56fd5ae39a2d7e8c91dcd76cc6d13f25f2aab
Diffstat (limited to 'media/base/mock_demuxer_host.h')
-rw-r--r--media/base/mock_demuxer_host.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/media/base/mock_demuxer_host.h b/media/base/mock_demuxer_host.h
new file mode 100644
index 0000000000..597c13298c
--- /dev/null
+++ b/media/base/mock_demuxer_host.h
@@ -0,0 +1,36 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+#ifndef MEDIA_BASE_MOCK_DEMUXER_HOST_H_
+#define MEDIA_BASE_MOCK_DEMUXER_HOST_H_
+
+#include <string>
+
+#include "media/base/demuxer.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+namespace media {
+
+class MockDemuxerHost : public DemuxerHost {
+ public:
+ MockDemuxerHost();
+ virtual ~MockDemuxerHost();
+
+ // DataSourceHost implementation.
+ MOCK_METHOD1(SetTotalBytes, void(int64 total_bytes));
+ MOCK_METHOD2(AddBufferedByteRange, void(int64 start, int64 end));
+ MOCK_METHOD2(AddBufferedTimeRange, void(base::TimeDelta start,
+ base::TimeDelta end));
+
+ // DemuxerHost implementation.
+ MOCK_METHOD1(OnDemuxerError, void(PipelineStatus error));
+ MOCK_METHOD1(SetDuration, void(base::TimeDelta duration));
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MockDemuxerHost);
+};
+
+} // namespace media
+
+#endif // MEDIA_BASE_MOCK_DEMUXER_HOST_H_