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

Side by Side Diff: media/blink/webmediaplayer_impl_unittest.cc

Issue 1996043002: Split MediaContentType and AudioFocusType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed nits Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « media/blink/webmediaplayer_impl.cc ('k') | media/media.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/blink/webmediaplayer_impl.h" 5 #include "media/blink/webmediaplayer_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 class MockWebMediaPlayerDelegate 93 class MockWebMediaPlayerDelegate
94 : public WebMediaPlayerDelegate, 94 : public WebMediaPlayerDelegate,
95 public base::SupportsWeakPtr<MockWebMediaPlayerDelegate> { 95 public base::SupportsWeakPtr<MockWebMediaPlayerDelegate> {
96 public: 96 public:
97 MockWebMediaPlayerDelegate() = default; 97 MockWebMediaPlayerDelegate() = default;
98 ~MockWebMediaPlayerDelegate() = default; 98 ~MockWebMediaPlayerDelegate() = default;
99 99
100 // WebMediaPlayerDelegate implementation. 100 // WebMediaPlayerDelegate implementation.
101 MOCK_METHOD1(AddObserver, int(Observer*)); 101 MOCK_METHOD1(AddObserver, int(Observer*));
102 MOCK_METHOD1(RemoveObserver, void(int)); 102 MOCK_METHOD1(RemoveObserver, void(int));
103 MOCK_METHOD5(DidPlay, void(int, bool, bool, bool, base::TimeDelta)); 103 MOCK_METHOD5(DidPlay, void(int, bool, bool, bool, MediaContentType));
104 MOCK_METHOD2(DidPause, void(int, bool)); 104 MOCK_METHOD2(DidPause, void(int, bool));
105 MOCK_METHOD1(PlayerGone, void(int)); 105 MOCK_METHOD1(PlayerGone, void(int));
106 MOCK_METHOD0(IsHidden, bool()); 106 MOCK_METHOD0(IsHidden, bool());
107 MOCK_METHOD0(IsPlayingBackgroundVideo, bool()); 107 MOCK_METHOD0(IsPlayingBackgroundVideo, bool());
108 }; 108 };
109 109
110 class WebMediaPlayerImplTest : public testing::Test { 110 class WebMediaPlayerImplTest : public testing::Test {
111 public: 111 public:
112 WebMediaPlayerImplTest() 112 WebMediaPlayerImplTest()
113 : media_thread_("MediaThreadForTest"), 113 : media_thread_("MediaThreadForTest"),
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 EXPECT_CALL(delegate_, IsPlayingBackgroundVideo()).WillOnce(Return(false)); 579 EXPECT_CALL(delegate_, IsPlayingBackgroundVideo()).WillOnce(Return(false));
580 EXPECT_CALL(delegate_, IsHidden()).WillRepeatedly(Return(true)); 580 EXPECT_CALL(delegate_, IsHidden()).WillRepeatedly(Return(true));
581 581
582 state = ComputeBackgroundedPlayState(); 582 state = ComputeBackgroundedPlayState();
583 EXPECT_EQ(WebMediaPlayerImpl::DelegateState::PAUSED, state.delegate_state); 583 EXPECT_EQ(WebMediaPlayerImpl::DelegateState::PAUSED, state.delegate_state);
584 EXPECT_FALSE(state.is_memory_reporting_enabled); 584 EXPECT_FALSE(state.is_memory_reporting_enabled);
585 EXPECT_TRUE(state.is_suspended); 585 EXPECT_TRUE(state.is_suspended);
586 } 586 }
587 587
588 } // namespace media 588 } // namespace media
OLDNEW
« no previous file with comments | « media/blink/webmediaplayer_impl.cc ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698