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

Side by Side Diff: media/renderers/video_renderer_impl_unittest.cc

Issue 1034233002: Move underflow threshold limits out of the video renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@frame_time
Patch Set: Add flag. Created 5 years, 8 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <utility> 5 #include <utility>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/debug/stack_trace.h" 10 #include "base/debug/stack_trace.h"
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 // Advance time more. Now we should signal having nothing. And put 504 // Advance time more. Now we should signal having nothing. And put
505 // the last frame up for display. 505 // the last frame up for display.
506 { 506 {
507 SCOPED_TRACE("Waiting for BUFFERING_HAVE_NOTHING"); 507 SCOPED_TRACE("Waiting for BUFFERING_HAVE_NOTHING");
508 WaitableMessageLoopEvent event; 508 WaitableMessageLoopEvent event;
509 EXPECT_CALL(mock_cb_, BufferingStateChange(BUFFERING_HAVE_NOTHING)) 509 EXPECT_CALL(mock_cb_, BufferingStateChange(BUFFERING_HAVE_NOTHING))
510 .WillOnce(RunClosure(event.GetClosure())); 510 .WillOnce(RunClosure(event.GetClosure()));
511 EXPECT_CALL(mock_cb_, Display(HasTimestamp(10))).Times(0); 511 EXPECT_CALL(mock_cb_, Display(HasTimestamp(10))).Times(0);
512 EXPECT_CALL(mock_cb_, Display(HasTimestamp(20))).Times(0); 512 EXPECT_CALL(mock_cb_, Display(HasTimestamp(20))).Times(0);
513 EXPECT_CALL(mock_cb_, Display(HasTimestamp(30))).Times(1); 513 EXPECT_CALL(mock_cb_, Display(HasTimestamp(30))).Times(1);
514 AdvanceTimeInMs(3000); // Must match kTimeToDeclareHaveNothing. 514 AdvanceTimeInMs(3000);
515 event.RunAndWait(); 515 event.RunAndWait();
516 } 516 }
517 517
518 // Receiving end of stream should signal having enough. 518 // Receiving end of stream should signal having enough.
519 { 519 {
520 SCOPED_TRACE("Waiting for BUFFERING_HAVE_ENOUGH"); 520 SCOPED_TRACE("Waiting for BUFFERING_HAVE_ENOUGH");
521 WaitableMessageLoopEvent event; 521 WaitableMessageLoopEvent event;
522 EXPECT_CALL(mock_cb_, BufferingStateChange(BUFFERING_HAVE_ENOUGH)) 522 EXPECT_CALL(mock_cb_, BufferingStateChange(BUFFERING_HAVE_ENOUGH))
523 .WillOnce(RunClosure(event.GetClosure())); 523 .WillOnce(RunClosure(event.GetClosure()));
524 SatisfyPendingReadWithEndOfStream(); 524 SatisfyPendingReadWithEndOfStream();
525 event.RunAndWait(); 525 event.RunAndWait();
526 } 526 }
527 527
528 WaitForEnded(); 528 WaitForEnded();
529 Destroy(); 529 Destroy();
530 } 530 }
531 531
532 } // namespace media 532 } // namespace media
OLDNEW
« media/renderers/renderer_impl_unittest.cc ('K') | « media/renderers/video_renderer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698