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

Side by Side Diff: content/browser/renderer_host/media/audio_output_delegate_impl_unittest.cc

Issue 2697793002: Add mojo interface+impl for audio stream control. (Closed)
Patch Set: Don't inline AudioOutputDelegate(EventHandler) dtor. Created 3 years, 9 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "content/browser/renderer_host/media/audio_output_delegate_impl.h" 5 #include "content/browser/renderer_host/media/audio_output_delegate_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 void OnSetCapturingLinkSecured(int render_process_id, 69 void OnSetCapturingLinkSecured(int render_process_id,
70 int render_frame_id, 70 int render_frame_id,
71 int page_request_id, 71 int page_request_id,
72 MediaStreamType stream_type, 72 MediaStreamType stream_type,
73 bool is_secure) override {} 73 bool is_secure) override {}
74 74
75 MOCK_METHOD2(OnCreatingAudioStream, 75 MOCK_METHOD2(OnCreatingAudioStream,
76 void(int render_process_id, int render_frame_id)); 76 void(int render_process_id, int render_frame_id));
77 }; 77 };
78 78
79 class MockEventHandler : public AudioOutputDelegate::EventHandler { 79 class MockEventHandler : public media::AudioOutputDelegate::EventHandler {
80 public: 80 public:
81 MOCK_METHOD3(OnStreamCreated, 81 MOCK_METHOD3(OnStreamCreated,
82 void(int stream_id, 82 void(int stream_id,
83 base::SharedMemory* shared_memory, 83 base::SharedMemory* shared_memory,
84 base::CancelableSyncSocket* socket)); 84 base::CancelableSyncSocket* socket));
85 MOCK_METHOD1(OnStreamError, void(int stream_id)); 85 MOCK_METHOD1(OnStreamError, void(int stream_id));
86 }; 86 };
87 87
88 class DummyAudioOutputStream : public media::AudioOutputStream { 88 class DummyAudioOutputStream : public media::AudioOutputStream {
89 public: 89 public:
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 TEST_F(AudioOutputDelegateTest, ErrorAndDestroy) { 570 TEST_F(AudioOutputDelegateTest, ErrorAndDestroy) {
571 base::RunLoop l; 571 base::RunLoop l;
572 BrowserThread::PostTask( 572 BrowserThread::PostTask(
573 BrowserThread::IO, FROM_HERE, 573 BrowserThread::IO, FROM_HERE,
574 base::Bind(&AudioOutputDelegateTest::PlayAndDestroyTest, 574 base::Bind(&AudioOutputDelegateTest::PlayAndDestroyTest,
575 base::Unretained(this), l.QuitClosure())); 575 base::Unretained(this), l.QuitClosure()));
576 l.Run(); 576 l.Run();
577 } 577 }
578 578
579 } // namespace content 579 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698