| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "core/html/HTMLVideoElement.h" | 5 #include "core/html/HTMLVideoElement.h" |
| 6 | 6 |
| 7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
| 8 #include "core/loader/EmptyClients.h" | 8 #include "core/loader/EmptyClients.h" |
| 9 #include "core/page/NetworkStateNotifier.h" | 9 #include "core/page/NetworkStateNotifier.h" |
| 10 #include "core/testing/DummyPageHolder.h" | 10 #include "core/testing/DummyPageHolder.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 // On play, the strategy is set to normal. | 132 // On play, the strategy is set to normal. |
| 133 EXPECT_CALL(*player, | 133 EXPECT_CALL(*player, |
| 134 setBufferingStrategy(WebMediaPlayer::BufferingStrategy::Normal)); | 134 setBufferingStrategy(WebMediaPlayer::BufferingStrategy::Normal)); |
| 135 m_video->play(); | 135 m_video->play(); |
| 136 ::testing::Mock::VerifyAndClearExpectations(player); | 136 ::testing::Mock::VerifyAndClearExpectations(player); |
| 137 | 137 |
| 138 // On a user pause, the strategy is set to aggressive. | 138 // On a user pause, the strategy is set to aggressive. |
| 139 EXPECT_CALL(*player, setBufferingStrategy( | 139 EXPECT_CALL(*player, setBufferingStrategy( |
| 140 WebMediaPlayer::BufferingStrategy::Aggressive)); | 140 WebMediaPlayer::BufferingStrategy::Aggressive)); |
| 141 { | 141 { |
| 142 UserGestureIndicator gesture(DefinitelyProcessingUserGesture); | 142 UserGestureIndicator gesture(UserGestureToken::create()); |
| 143 m_video->pause(); | 143 m_video->pause(); |
| 144 } | 144 } |
| 145 ::testing::Mock::VerifyAndClearExpectations(player); | 145 ::testing::Mock::VerifyAndClearExpectations(player); |
| 146 | 146 |
| 147 // On play, the strategy is set to normal. | 147 // On play, the strategy is set to normal. |
| 148 EXPECT_CALL(*player, | 148 EXPECT_CALL(*player, |
| 149 setBufferingStrategy(WebMediaPlayer::BufferingStrategy::Normal)); | 149 setBufferingStrategy(WebMediaPlayer::BufferingStrategy::Normal)); |
| 150 m_video->play(); | 150 m_video->play(); |
| 151 ::testing::Mock::VerifyAndClearExpectations(player); | 151 ::testing::Mock::VerifyAndClearExpectations(player); |
| 152 } | 152 } |
| 153 | 153 |
| 154 } // namespace blink | 154 } // namespace blink |
| OLD | NEW |