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

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

Issue 8872030: Removing MessageLoop::QuitTask() from content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix escaping Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "content/browser/browser_thread_impl.h" 10 #include "content/browser/browser_thread_impl.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // Returns true if machine has audio input device, else returns false. 83 // Returns true if machine has audio input device, else returns false.
84 static bool CanRunAudioInputDeviceTests() { 84 static bool CanRunAudioInputDeviceTests() {
85 AudioManager* audio_manager = AudioManager::GetAudioManager(); 85 AudioManager* audio_manager = AudioManager::GetAudioManager();
86 if (!audio_manager) 86 if (!audio_manager)
87 return false; 87 return false;
88 88
89 return audio_manager->HasAudioInputDevices(); 89 return audio_manager->HasAudioInputDevices();
90 } 90 }
91 91
92 ACTION_P(ExitMessageLoop, message_loop) { 92 ACTION_P(ExitMessageLoop, message_loop) {
93 message_loop->PostTask(FROM_HERE, new MessageLoop::QuitTask()); 93 message_loop->PostTask(FROM_HERE, MessageLoop::QuitClosure());
94 } 94 }
95 95
96 class AudioInputDeviceManagerTest: public testing::Test { 96 class AudioInputDeviceManagerTest: public testing::Test {
97 public: 97 public:
98 AudioInputDeviceManagerTest() 98 AudioInputDeviceManagerTest()
99 : message_loop_(), 99 : message_loop_(),
100 io_thread_(), 100 io_thread_(),
101 manager_(), 101 manager_(),
102 audio_input_listener_() {} 102 audio_input_listener_() {}
103 103
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 .Times(1); 460 .Times(1);
461 461
462 manager_->Stop(session_id); 462 manager_->Stop(session_id);
463 manager_->Close(session_id); 463 manager_->Close(session_id);
464 EXPECT_CALL(*audio_input_listener_, Closed(kAudioCapture, session_id)) 464 EXPECT_CALL(*audio_input_listener_, Closed(kAudioCapture, session_id))
465 .Times(1); 465 .Times(1);
466 message_loop_->RunAllPending(); 466 message_loop_->RunAllPending();
467 } 467 }
468 468
469 } // namespace media_stream 469 } // namespace media_stream
OLDNEW
« no previous file with comments | « content/browser/plugin_service_browsertest.cc ('k') | content/browser/renderer_host/media/audio_renderer_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698