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

Side by Side Diff: media/audio/win/core_audio_util_win_unittest.cc

Issue 23523023: Add GetOutputStreamParameters, GetAssociatedOutputDeviceID to AudioManager. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "base/synchronization/waitable_event.h" 7 #include "base/synchronization/waitable_event.h"
8 #include "base/win/scoped_co_mem.h" 8 #include "base/win/scoped_co_mem.h"
9 #include "base/win/scoped_com_initializer.h" 9 #include "base/win/scoped_com_initializer.h"
10 #include "base/win/scoped_handle.h" 10 #include "base/win/scoped_handle.h"
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 base::win::ScopedCoMem<WCHAR> wide_id; 504 base::win::ScopedCoMem<WCHAR> wide_id;
505 device->GetId(&wide_id); 505 device->GetId(&wide_id);
506 std::string id; 506 std::string id;
507 WideToUTF8(wide_id, wcslen(wide_id), &id); 507 WideToUTF8(wide_id, wcslen(wide_id), &id);
508 found_a_pair = !CoreAudioUtil::GetMatchingOutputDeviceID(id).empty(); 508 found_a_pair = !CoreAudioUtil::GetMatchingOutputDeviceID(id).empty();
509 } 509 }
510 510
511 EXPECT_TRUE(found_a_pair); 511 EXPECT_TRUE(found_a_pair);
512 } 512 }
513 513
514 TEST_F(CoreAudioUtilWinTest, GetDefaultOutputDeviceID) {
515 if (!CanRunAudioTest())
516 return;
517
518 std::string default_device_id(CoreAudioUtil::GetDefaultOutputDeviceID());
519 EXPECT_FALSE(default_device_id.empty());
520 }
521
514 } // namespace media 522 } // namespace media
OLDNEW
« media/audio/win/core_audio_util_win.cc ('K') | « media/audio/win/core_audio_util_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698