Index: content/browser/renderer_host/media/audio_renderer_host_unittest.cc |
diff --git a/content/browser/renderer_host/media/audio_renderer_host_unittest.cc b/content/browser/renderer_host/media/audio_renderer_host_unittest.cc |
index 1fe9f76f8b2b4025693e9e5980bc7d92c5b7878c..65201b3c5f9c47ba3c24162b208c5ab4af59ac29 100644 |
--- a/content/browser/renderer_host/media/audio_renderer_host_unittest.cc |
+++ b/content/browser/renderer_host/media/audio_renderer_host_unittest.cc |
@@ -101,13 +101,13 @@ class MockAudioRendererHost : public AudioRendererHost { |
media::OutputDeviceStatus device_status, |
const media::AudioParameters& output_params, |
const std::string& matched_device_id)); |
- MOCK_METHOD2(OnStreamCreated, void(int stream_id, int length)); |
- MOCK_METHOD1(OnStreamError, void(int stream_id)); |
+ MOCK_METHOD2(WasNotifiedOfCreation, void(int stream_id, int length)); |
+ MOCK_METHOD1(WasNotifiedOfError, void(int stream_id)); |
private: |
virtual ~MockAudioRendererHost() { |
// Make sure all audio streams have been deleted. |
- EXPECT_TRUE(audio_entries_.empty()); |
+ EXPECT_TRUE(delegates_.empty()); |
} |
// This method is used to dispatch IPC messages to the renderer. We intercept |
@@ -162,10 +162,10 @@ class MockAudioRendererHost : public AudioRendererHost { |
sync_socket_.reset(new base::SyncSocket(sync_socket_handle)); |
// And then delegate the call to the mock method. |
- OnStreamCreated(stream_id, length); |
+ WasNotifiedOfCreation(stream_id, length); |
} |
- void OnNotifyStreamError(int stream_id) { OnStreamError(stream_id); } |
+ void OnNotifyStreamError(int stream_id) { WasNotifiedOfError(stream_id); } |
std::unique_ptr<base::SharedMemory> shared_memory_; |
std::unique_ptr<base::SyncSocket> sync_socket_; |
@@ -225,7 +225,7 @@ class AudioRendererHostTest : public testing::Test { |
OnDeviceAuthorized(kStreamId, expected_device_status, _, _)); |
if (expected_device_status == media::OUTPUT_DEVICE_STATUS_OK) { |
- EXPECT_CALL(*host_.get(), OnStreamCreated(kStreamId, _)); |
+ EXPECT_CALL(*host_.get(), WasNotifiedOfCreation(kStreamId, _)); |
EXPECT_CALL(mirroring_manager_, |
AddDiverter(kRenderProcessId, kRenderFrameId, NotNull())) |
.RetiresOnSaturation(); |
@@ -275,11 +275,11 @@ class AudioRendererHostTest : public testing::Test { |
void CreateWithInvalidRenderFrameId() { |
// When creating a stream with an invalid render frame ID, the host will |
// reply with a stream error message. |
- EXPECT_CALL(*host_, OnStreamError(kStreamId)); |
+ EXPECT_CALL(*host_, WasNotifiedOfError(kStreamId)); |
// However, validation does not block stream creation, so these method calls |
// might be made: |
- EXPECT_CALL(*host_, OnStreamCreated(kStreamId, _)).Times(AtLeast(0)); |
+ EXPECT_CALL(*host_, WasNotifiedOfCreation(kStreamId, _)).Times(AtLeast(0)); |
EXPECT_CALL(mirroring_manager_, AddDiverter(_, _, _)).Times(AtLeast(0)); |
EXPECT_CALL(mirroring_manager_, RemoveDiverter(_)).Times(AtLeast(0)); |
@@ -317,18 +317,18 @@ class AudioRendererHostTest : public testing::Test { |
} |
void SimulateError() { |
- EXPECT_EQ(1u, host_->audio_entries_.size()) |
+ EXPECT_EQ(1u, host_->delegates_.size()) |
<< "Calls Create() before calling this method"; |
// Expect an error signal sent through IPC. |
- EXPECT_CALL(*host_.get(), OnStreamError(kStreamId)); |
+ EXPECT_CALL(*host_.get(), WasNotifiedOfError(kStreamId)); |
// Simulate an error sent from the audio device. |
- host_->ReportErrorAndClose(kStreamId); |
+ host_->OnStreamError(kStreamId); |
SyncWithAudioThread(); |
// Expect the audio stream record is removed. |
- EXPECT_EQ(0u, host_->audio_entries_.size()); |
+ EXPECT_EQ(0u, host_->delegates_.size()); |
} |
// SyncWithAudioThread() waits until all pending tasks on the audio thread |