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

Unified Diff: content/public/test/mock_media_session.h

Issue 2623953002: [Chromecast] Fix media session blocking tests. (Closed)
Patch Set: Removed stale TODO Created 3 years, 11 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
« no previous file with comments | « content/public/browser/media_session_observer.cc ('k') | content/public/test/mock_media_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/mock_media_session.h
diff --git a/content/public/test/mock_media_session.h b/content/public/test/mock_media_session.h
new file mode 100644
index 0000000000000000000000000000000000000000..4f0a0ad0b00e662840208cafe902b54a093cd0e8
--- /dev/null
+++ b/content/public/test/mock_media_session.h
@@ -0,0 +1,31 @@
+// Copyright (c) 2017 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 CONTENT_PUBLIC_TEST_MOCK_MEDIA_SESSION_H_
+#define CONTENT_PUBLIC_TEST_MOCK_MEDIA_SESSION_H_
+
+#include "content/public/browser/media_session.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+namespace content {
+
+class MockMediaSession : public MediaSession {
Zhiqiang Zhang (Slow) 2017/01/20 16:27:56 I think the major change is to make content::Media
derekjchow1 2017/01/23 21:04:32 SGTM. Done.
+ public:
+ MockMediaSession();
+ ~MockMediaSession() override;
+
+ MOCK_METHOD1(Resume, void(content::MediaSession::SuspendType));
+ MOCK_METHOD1(Suspend, void(content::MediaSession::SuspendType));
+ MOCK_METHOD1(Stop, void(content::MediaSession::SuspendType));
+ MOCK_METHOD0(StartDucking, void());
+ MOCK_METHOD0(StopDucking, void());
+ MOCK_METHOD1(DidReceiveAction, void(blink::mojom::MediaSessionAction));
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MockMediaSession);
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_TEST_MOCK_MEDIA_SESSION_H_
« no previous file with comments | « content/public/browser/media_session_observer.cc ('k') | content/public/test/mock_media_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698