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

Side by Side Diff: content/renderer/media/audio_message_filter_unittest.cc

Issue 2211473003: Remove calls to deprecated MessageLoop methods on Windows and Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 3 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 (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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/run_loop.h"
10 #include "content/common/media/audio_messages.h" 11 #include "content/common/media/audio_messages.h"
11 #include "content/renderer/media/audio_message_filter.h" 12 #include "content/renderer/media/audio_message_filter.h"
12 #include "media/audio/audio_output_ipc.h" 13 #include "media/audio/audio_output_ipc.h"
13 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
14 15
15 namespace content { 16 namespace content {
16 namespace { 17 namespace {
17 18
18 const int kRenderFrameId = 2; 19 const int kRenderFrameId = 2;
19 const char kEmptyMatchedDeviceId[] = ""; 20 const char kEmptyMatchedDeviceId[] = "";
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 187
187 EXPECT_FALSE(delegate1.state_changed_received()); 188 EXPECT_FALSE(delegate1.state_changed_received());
188 EXPECT_FALSE(delegate2.state_changed_received()); 189 EXPECT_FALSE(delegate2.state_changed_received());
189 filter->OnMessageReceived( 190 filter->OnMessageReceived(
190 AudioMsg_NotifyStreamStateChanged( 191 AudioMsg_NotifyStreamStateChanged(
191 kStreamId2, media::AUDIO_OUTPUT_IPC_DELEGATE_STATE_PLAYING)); 192 kStreamId2, media::AUDIO_OUTPUT_IPC_DELEGATE_STATE_PLAYING));
192 EXPECT_FALSE(delegate1.state_changed_received()); 193 EXPECT_FALSE(delegate1.state_changed_received());
193 EXPECT_TRUE(delegate2.state_changed_received()); 194 EXPECT_TRUE(delegate2.state_changed_received());
194 delegate2.Reset(); 195 delegate2.Reset();
195 196
196 message_loop.RunUntilIdle(); 197 base::RunLoop().RunUntilIdle();
197 198
198 ipc1->CloseStream(); 199 ipc1->CloseStream();
199 ipc2->CloseStream(); 200 ipc2->CloseStream();
200 EXPECT_EQ(static_cast<media::AudioOutputIPCDelegate*>(NULL), 201 EXPECT_EQ(static_cast<media::AudioOutputIPCDelegate*>(NULL),
201 filter->delegates_.Lookup(kStreamId1)); 202 filter->delegates_.Lookup(kStreamId1));
202 EXPECT_EQ(static_cast<media::AudioOutputIPCDelegate*>(NULL), 203 EXPECT_EQ(static_cast<media::AudioOutputIPCDelegate*>(NULL),
203 filter->delegates_.Lookup(kStreamId2)); 204 filter->delegates_.Lookup(kStreamId2));
204 } 205 }
205 206
206 } // namespace content 207 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/content_browser_test.cc ('k') | content/renderer/media/media_stream_video_capturer_source_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698