OLD | NEW |
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/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/environment.h" | 7 #include "base/environment.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 class AudioOutputControllerTest : public testing::Test { | 92 class AudioOutputControllerTest : public testing::Test { |
93 public: | 93 public: |
94 AudioOutputControllerTest() | 94 AudioOutputControllerTest() |
95 : audio_manager_(AudioManager::CreateForTesting()), | 95 : audio_manager_(AudioManager::CreateForTesting()), |
96 create_event_(false, false), | 96 create_event_(false, false), |
97 play_event_(false, false), | 97 play_event_(false, false), |
98 read_event_(false, false), | 98 read_event_(false, false), |
99 pause_event_(false, false) { | 99 pause_event_(false, false) { |
100 } | 100 } |
101 | 101 |
102 virtual ~AudioOutputControllerTest() { | 102 ~AudioOutputControllerTest() override {} |
103 } | |
104 | 103 |
105 protected: | 104 protected: |
106 void Create(int samples_per_packet) { | 105 void Create(int samples_per_packet) { |
107 EXPECT_FALSE(create_event_.IsSignaled()); | 106 EXPECT_FALSE(create_event_.IsSignaled()); |
108 EXPECT_FALSE(play_event_.IsSignaled()); | 107 EXPECT_FALSE(play_event_.IsSignaled()); |
109 EXPECT_FALSE(read_event_.IsSignaled()); | 108 EXPECT_FALSE(read_event_.IsSignaled()); |
110 EXPECT_FALSE(pause_event_.IsSignaled()); | 109 EXPECT_FALSE(pause_event_.IsSignaled()); |
111 | 110 |
112 params_ = AudioParameters( | 111 params_ = AudioParameters( |
113 AudioParameters::AUDIO_FAKE, kChannelLayout, | 112 AudioParameters::AUDIO_FAKE, kChannelLayout, |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 | 404 |
406 TEST_F(AudioOutputControllerTest, DivertRevertClose) { | 405 TEST_F(AudioOutputControllerTest, DivertRevertClose) { |
407 Create(kSamplesPerPacket); | 406 Create(kSamplesPerPacket); |
408 WaitForCreate(); | 407 WaitForCreate(); |
409 DivertNeverPlaying(); | 408 DivertNeverPlaying(); |
410 RevertWasNotPlaying(); | 409 RevertWasNotPlaying(); |
411 Close(); | 410 Close(); |
412 } | 411 } |
413 | 412 |
414 } // namespace media | 413 } // namespace media |
OLD | NEW |