Chromium Code Reviews| 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_ |