| OLD | NEW |
| 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 "content/browser/media/media_internals.h" | 5 #include "content/browser/media/media_internals.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 class MediaInternalsVideoCaptureDeviceTest : public testing::Test, | 94 class MediaInternalsVideoCaptureDeviceTest : public testing::Test, |
| 95 public MediaInternalsTestBase { | 95 public MediaInternalsTestBase { |
| 96 public: | 96 public: |
| 97 MediaInternalsVideoCaptureDeviceTest() | 97 MediaInternalsVideoCaptureDeviceTest() |
| 98 : update_cb_(base::Bind( | 98 : update_cb_(base::Bind( |
| 99 &MediaInternalsVideoCaptureDeviceTest::UpdateCallbackImpl, | 99 &MediaInternalsVideoCaptureDeviceTest::UpdateCallbackImpl, |
| 100 base::Unretained(this))) { | 100 base::Unretained(this))) { |
| 101 media_internals_->AddUpdateCallback(update_cb_); | 101 media_internals_->AddUpdateCallback(update_cb_); |
| 102 } | 102 } |
| 103 | 103 |
| 104 virtual ~MediaInternalsVideoCaptureDeviceTest() { | 104 ~MediaInternalsVideoCaptureDeviceTest() override { |
| 105 media_internals_->RemoveUpdateCallback(update_cb_); | 105 media_internals_->RemoveUpdateCallback(update_cb_); |
| 106 } | 106 } |
| 107 | 107 |
| 108 protected: | 108 protected: |
| 109 MediaInternals::UpdateCallback update_cb_; | 109 MediaInternals::UpdateCallback update_cb_; |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 #if defined(OS_WIN) || defined(OS_MACOSX) | 112 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 113 TEST_F(MediaInternalsVideoCaptureDeviceTest, | 113 TEST_F(MediaInternalsVideoCaptureDeviceTest, |
| 114 AllCaptureApiTypesHaveProperStringRepresentation) { | 114 AllCaptureApiTypesHaveProperStringRepresentation) { |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 ExpectStatus("closed"); | 282 ExpectStatus("closed"); |
| 283 } | 283 } |
| 284 | 284 |
| 285 INSTANTIATE_TEST_CASE_P( | 285 INSTANTIATE_TEST_CASE_P( |
| 286 MediaInternalsAudioLogTest, MediaInternalsAudioLogTest, testing::Values( | 286 MediaInternalsAudioLogTest, MediaInternalsAudioLogTest, testing::Values( |
| 287 media::AudioLogFactory::AUDIO_INPUT_CONTROLLER, | 287 media::AudioLogFactory::AUDIO_INPUT_CONTROLLER, |
| 288 media::AudioLogFactory::AUDIO_OUTPUT_CONTROLLER, | 288 media::AudioLogFactory::AUDIO_OUTPUT_CONTROLLER, |
| 289 media::AudioLogFactory::AUDIO_OUTPUT_STREAM)); | 289 media::AudioLogFactory::AUDIO_OUTPUT_STREAM)); |
| 290 | 290 |
| 291 } // namespace content | 291 } // namespace content |
| OLD | NEW |