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

Unified Diff: content/browser/media/capture/web_contents_audio_input_stream_unittest.cc

Issue 449733002: Use a TestBrowserThreadBundle in WebContentsAudioInputStreamTest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: IWYU Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/capture/web_contents_audio_input_stream_unittest.cc
diff --git a/content/browser/media/capture/web_contents_audio_input_stream_unittest.cc b/content/browser/media/capture/web_contents_audio_input_stream_unittest.cc
index 72f6109029d1b6432c97a91d26d664fa093bfd38..d8175610def07d80ee63fc5e625029488fff4660 100644
--- a/content/browser/media/capture/web_contents_audio_input_stream_unittest.cc
+++ b/content/browser/media/capture/web_contents_audio_input_stream_unittest.cc
@@ -11,9 +11,10 @@
#include "base/message_loop/message_loop.h"
#include "base/synchronization/waitable_event.h"
#include "base/threading/thread.h"
-#include "content/browser/browser_thread_impl.h"
#include "content/browser/media/capture/audio_mirroring_manager.h"
#include "content/browser/media/capture/web_contents_tracker.h"
+#include "content/public/browser/browser_thread.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "media/audio/simple_sources.h"
#include "media/audio/virtual_audio_input_stream.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -177,8 +178,8 @@ class MockAudioInputCallback : public AudioInputStream::AudioInputCallback {
class WebContentsAudioInputStreamTest : public testing::Test {
public:
WebContentsAudioInputStreamTest()
- : audio_thread_("Audio thread"),
- io_thread_(BrowserThread::IO),
+ : thread_bundle_(TestBrowserThreadBundle::REAL_IO_THREAD),
+ audio_thread_("Audio thread"),
mock_mirroring_manager_(new MockAudioMirroringManager()),
mock_tracker_(new MockWebContentsTracker()),
mock_vais_(NULL),
@@ -188,12 +189,10 @@ class WebContentsAudioInputStreamTest : public testing::Test {
current_render_view_id_(kRenderViewId),
on_data_event_(false, false) {
audio_thread_.Start();
- io_thread_.Start();
}
virtual ~WebContentsAudioInputStreamTest() {
audio_thread_.Stop();
- io_thread_.Stop();
DCHECK(!mock_vais_);
DCHECK(!wcais_);
@@ -369,8 +368,8 @@ class WebContentsAudioInputStreamTest : public testing::Test {
}
private:
+ TestBrowserThreadBundle thread_bundle_;
base::Thread audio_thread_;
- BrowserThreadImpl io_thread_;
scoped_ptr<MockAudioMirroringManager> mock_mirroring_manager_;
scoped_refptr<MockWebContentsTracker> mock_tracker_;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698