| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/callback_helpers.h" | 6 #include "base/callback_helpers.h" |
| 7 #include "base/format_macros.h" | 7 #include "base/format_macros.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "base/test/simple_test_tick_clock.h" | 10 #include "base/test/simple_test_tick_clock.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 last_statistics_.audio_memory_usage += stats.audio_memory_usage; | 117 last_statistics_.audio_memory_usage += stats.audio_memory_usage; |
| 118 } | 118 } |
| 119 | 119 |
| 120 MOCK_METHOD1(OnBufferingStateChange, void(BufferingState)); | 120 MOCK_METHOD1(OnBufferingStateChange, void(BufferingState)); |
| 121 MOCK_METHOD1(OnError, void(PipelineStatus)); | 121 MOCK_METHOD1(OnError, void(PipelineStatus)); |
| 122 MOCK_METHOD0(OnWaitingForDecryptionKey, void(void)); | 122 MOCK_METHOD0(OnWaitingForDecryptionKey, void(void)); |
| 123 | 123 |
| 124 void InitializeRenderer(const PipelineStatusCB& pipeline_status_cb) { | 124 void InitializeRenderer(const PipelineStatusCB& pipeline_status_cb) { |
| 125 EXPECT_CALL(*this, OnWaitingForDecryptionKey()).Times(0); | 125 EXPECT_CALL(*this, OnWaitingForDecryptionKey()).Times(0); |
| 126 renderer_->Initialize( | 126 renderer_->Initialize( |
| 127 &demuxer_stream_, pipeline_status_cb, SetDecryptorReadyCB(), | 127 &demuxer_stream_, pipeline_status_cb, SetCdmReadyCB(), |
| 128 base::Bind(&AudioRendererImplTest::OnStatistics, | 128 base::Bind(&AudioRendererImplTest::OnStatistics, |
| 129 base::Unretained(this)), | 129 base::Unretained(this)), |
| 130 base::Bind(&AudioRendererImplTest::OnBufferingStateChange, | 130 base::Bind(&AudioRendererImplTest::OnBufferingStateChange, |
| 131 base::Unretained(this)), | 131 base::Unretained(this)), |
| 132 base::Bind(&AudioRendererImplTest::OnEnded, base::Unretained(this)), | 132 base::Bind(&AudioRendererImplTest::OnEnded, base::Unretained(this)), |
| 133 base::Bind(&AudioRendererImplTest::OnError, base::Unretained(this)), | 133 base::Bind(&AudioRendererImplTest::OnError, base::Unretained(this)), |
| 134 base::Bind(&AudioRendererImplTest::OnWaitingForDecryptionKey, | 134 base::Bind(&AudioRendererImplTest::OnWaitingForDecryptionKey, |
| 135 base::Unretained(this))); | 135 base::Unretained(this))); |
| 136 } | 136 } |
| 137 | 137 |
| (...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 882 // Advance far enough that we shouldn't be clamped to current time (tested | 882 // Advance far enough that we shouldn't be clamped to current time (tested |
| 883 // already above). | 883 // already above). |
| 884 tick_clock_->Advance(kOneSecond); | 884 tick_clock_->Advance(kOneSecond); |
| 885 EXPECT_EQ( | 885 EXPECT_EQ( |
| 886 current_time + timestamp_helper.GetFrameDuration(frames_to_consume.value), | 886 current_time + timestamp_helper.GetFrameDuration(frames_to_consume.value), |
| 887 CurrentMediaWallClockTime(&is_time_moving)); | 887 CurrentMediaWallClockTime(&is_time_moving)); |
| 888 EXPECT_TRUE(is_time_moving); | 888 EXPECT_TRUE(is_time_moving); |
| 889 } | 889 } |
| 890 | 890 |
| 891 } // namespace media | 891 } // namespace media |
| OLD | NEW |