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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLVideoElementTest.cpp

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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
OLDNEW
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 <memory> 7 #include <memory>
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/dom/DocumentUserGestureToken.h" 9 #include "core/dom/DocumentUserGestureToken.h"
10 #include "core/loader/EmptyClients.h" 10 #include "core/loader/EmptyClients.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 MockWebMediaPlayer* player = webMediaPlayer(); 130 MockWebMediaPlayer* player = webMediaPlayer();
131 ASSERT_TRUE(player); 131 ASSERT_TRUE(player);
132 132
133 // On play, the strategy is set to normal. 133 // On play, the strategy is set to normal.
134 EXPECT_CALL(*player, 134 EXPECT_CALL(*player,
135 setBufferingStrategy(WebMediaPlayer::BufferingStrategy::Normal)); 135 setBufferingStrategy(WebMediaPlayer::BufferingStrategy::Normal));
136 m_video->play(); 136 m_video->play();
137 ::testing::Mock::VerifyAndClearExpectations(player); 137 ::testing::Mock::VerifyAndClearExpectations(player);
138 138
139 // On a user pause, the strategy is set to aggressive. 139 // On a user pause, the strategy is set to aggressive.
140 EXPECT_CALL(*player, setBufferingStrategy( 140 EXPECT_CALL(
141 WebMediaPlayer::BufferingStrategy::Aggressive)); 141 *player,
142 setBufferingStrategy(WebMediaPlayer::BufferingStrategy::Aggressive));
142 { 143 {
143 UserGestureIndicator gesture( 144 UserGestureIndicator gesture(
144 DocumentUserGestureToken::create(&m_video->document())); 145 DocumentUserGestureToken::create(&m_video->document()));
145 m_video->pause(); 146 m_video->pause();
146 } 147 }
147 ::testing::Mock::VerifyAndClearExpectations(player); 148 ::testing::Mock::VerifyAndClearExpectations(player);
148 149
149 // On play, the strategy is set to normal. 150 // On play, the strategy is set to normal.
150 EXPECT_CALL(*player, 151 EXPECT_CALL(*player,
151 setBufferingStrategy(WebMediaPlayer::BufferingStrategy::Normal)); 152 setBufferingStrategy(WebMediaPlayer::BufferingStrategy::Normal));
152 m_video->play(); 153 m_video->play();
153 ::testing::Mock::VerifyAndClearExpectations(player); 154 ::testing::Mock::VerifyAndClearExpectations(player);
154 } 155 }
155 156
156 } // namespace blink 157 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698