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

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

Issue 136683004: Removes MessageLoop::TYPE_XXX where possible (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: resolve merge Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
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 <string> 5 #include <string>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 AudioInputDeviceManagerTest() {} 45 AudioInputDeviceManagerTest() {}
46 46
47 // Returns true iff machine has an audio input device. 47 // Returns true iff machine has an audio input device.
48 bool CanRunAudioInputDeviceTests() { 48 bool CanRunAudioInputDeviceTests() {
49 return audio_manager_->HasAudioInputDevices(); 49 return audio_manager_->HasAudioInputDevices();
50 } 50 }
51 51
52 protected: 52 protected:
53 virtual void SetUp() OVERRIDE { 53 virtual void SetUp() OVERRIDE {
54 // The test must run on Browser::IO. 54 // The test must run on Browser::IO.
55 message_loop_.reset(new base::MessageLoop(base::MessageLoop::TYPE_IO)); 55 message_loop_.reset(new base::MessageLoopForIO);
56 io_thread_.reset(new BrowserThreadImpl(BrowserThread::IO, 56 io_thread_.reset(new BrowserThreadImpl(BrowserThread::IO,
57 message_loop_.get())); 57 message_loop_.get()));
58 audio_manager_.reset(media::AudioManager::CreateForTesting()); 58 audio_manager_.reset(media::AudioManager::CreateForTesting());
59 manager_ = new AudioInputDeviceManager(audio_manager_.get()); 59 manager_ = new AudioInputDeviceManager(audio_manager_.get());
60 audio_input_listener_.reset(new MockAudioInputDeviceManagerListener()); 60 audio_input_listener_.reset(new MockAudioInputDeviceManagerListener());
61 manager_->Register(audio_input_listener_.get(), 61 manager_->Register(audio_input_listener_.get(),
62 message_loop_->message_loop_proxy().get()); 62 message_loop_->message_loop_proxy().get());
63 63
64 // Gets the enumerated device list from the AudioInputDeviceManager. 64 // Gets the enumerated device list from the AudioInputDeviceManager.
65 manager_->EnumerateDevices(MEDIA_DEVICE_AUDIO_CAPTURE); 65 manager_->EnumerateDevices(MEDIA_DEVICE_AUDIO_CAPTURE);
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 DCHECK(!info); 282 DCHECK(!info);
283 283
284 manager_->Close(session_id); 284 manager_->Close(session_id);
285 EXPECT_CALL(*audio_input_listener_, 285 EXPECT_CALL(*audio_input_listener_,
286 Closed(MEDIA_DEVICE_AUDIO_CAPTURE, session_id)) 286 Closed(MEDIA_DEVICE_AUDIO_CAPTURE, session_id))
287 .Times(1); 287 .Times(1);
288 message_loop_->RunUntilIdle(); 288 message_loop_->RunUntilIdle();
289 } 289 }
290 290
291 } // namespace content 291 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698