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

Side by Side Diff: content/renderer/media/webmediaplayer_ms_unittest.cc

Issue 2440563004: Switch to using an explicit ended signal instead of time comparison. (Closed)
Patch Set: Fix ended event in ARI. Created 4 years, 1 month 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "content/public/renderer/media_stream_renderer_factory.h" 9 #include "content/public/renderer/media_stream_renderer_factory.h"
10 #include "content/renderer/media/webmediaplayer_ms.h" 10 #include "content/renderer/media/webmediaplayer_ms.h"
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 ~WebMediaPlayerMSTest() override { 389 ~WebMediaPlayerMSTest() override {
390 player_.reset(); 390 player_.reset();
391 base::RunLoop().RunUntilIdle(); 391 base::RunLoop().RunUntilIdle();
392 } 392 }
393 393
394 MockMediaStreamVideoRenderer* LoadAndGetFrameProvider(bool algorithm_enabled); 394 MockMediaStreamVideoRenderer* LoadAndGetFrameProvider(bool algorithm_enabled);
395 395
396 // Implementation of WebMediaPlayerClient 396 // Implementation of WebMediaPlayerClient
397 void networkStateChanged() override; 397 void networkStateChanged() override;
398 void readyStateChanged() override; 398 void readyStateChanged() override;
399 void timeChanged() override {} 399 void timeChanged(bool) override {}
400 void repaint() override {} 400 void repaint() override {}
401 void durationChanged() override {} 401 void durationChanged() override {}
402 void sizeChanged() override; 402 void sizeChanged() override;
403 void playbackStateChanged() override {} 403 void playbackStateChanged() override {}
404 void setWebLayer(blink::WebLayer* layer) override; 404 void setWebLayer(blink::WebLayer* layer) override;
405 blink::WebMediaPlayer::TrackId addAudioTrack(const blink::WebString& id, 405 blink::WebMediaPlayer::TrackId addAudioTrack(const blink::WebString& id,
406 AudioTrackKind, 406 AudioTrackKind,
407 const blink::WebString& label, 407 const blink::WebString& label,
408 const blink::WebString& language, 408 const blink::WebString& language,
409 bool enabled) override { 409 bool enabled) override {
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
915 // OnShown() should restart after a forced suspension. 915 // OnShown() should restart after a forced suspension.
916 player_->OnShown(); 916 player_->OnShown();
917 EXPECT_FALSE(player_->paused()); 917 EXPECT_FALSE(player_->paused());
918 EXPECT_CALL(*this, DoSetWebLayer(false)); 918 EXPECT_CALL(*this, DoSetWebLayer(false));
919 919
920 base::RunLoop().RunUntilIdle(); 920 base::RunLoop().RunUntilIdle();
921 } 921 }
922 #endif 922 #endif
923 923
924 } // namespace content 924 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698