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

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

Issue 10837118: Dead code elimination: scythe.chrome_functions:segment.path %media% edition, round 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 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.h" 10 #include "base/message_loop.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 FROM_HERE, base::Bind( 74 FROM_HERE, base::Bind(
75 &MockAudioInputDeviceManagerEventHandler::DeviceStopped, 75 &MockAudioInputDeviceManagerEventHandler::DeviceStopped,
76 base::Unretained(this), session_id)); 76 base::Unretained(this), session_id));
77 } 77 }
78 78
79 private: 79 private:
80 MessageLoop* message_loop_; 80 MessageLoop* message_loop_;
81 DISALLOW_COPY_AND_ASSIGN(MockAudioInputDeviceManagerEventHandler); 81 DISALLOW_COPY_AND_ASSIGN(MockAudioInputDeviceManagerEventHandler);
82 }; 82 };
83 83
84 ACTION_P(ExitMessageLoop, message_loop) {
85 message_loop->PostTask(FROM_HERE, MessageLoop::QuitClosure());
86 }
87
88 class AudioInputDeviceManagerTest : public testing::Test { 84 class AudioInputDeviceManagerTest : public testing::Test {
89 public: 85 public:
90 AudioInputDeviceManagerTest() {} 86 AudioInputDeviceManagerTest() {}
91 87
92 // Returns true iff machine has an audio input device. 88 // Returns true iff machine has an audio input device.
93 bool CanRunAudioInputDeviceTests() { 89 bool CanRunAudioInputDeviceTests() {
94 return audio_manager_->HasAudioInputDevices(); 90 return audio_manager_->HasAudioInputDevices();
95 } 91 }
96 92
97 protected: 93 protected:
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 manager_->Stop(session_id); 506 manager_->Stop(session_id);
511 manager_->Close(session_id); 507 manager_->Close(session_id);
512 EXPECT_CALL(*audio_input_listener_, 508 EXPECT_CALL(*audio_input_listener_,
513 Closed(content::MEDIA_STREAM_DEVICE_TYPE_AUDIO_CAPTURE, 509 Closed(content::MEDIA_STREAM_DEVICE_TYPE_AUDIO_CAPTURE,
514 session_id)) 510 session_id))
515 .Times(1); 511 .Times(1);
516 message_loop_->RunAllPending(); 512 message_loop_->RunAllPending();
517 } 513 }
518 514
519 } // namespace media_stream 515 } // namespace media_stream
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698