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 <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 0, | 43 0, |
44 std::vector<SubsampleEntry>()))); | 44 std::vector<SubsampleEntry>()))); |
45 return buffer; | 45 return buffer; |
46 } | 46 } |
47 | 47 |
48 // Use anonymous namespace here to prevent the actions to be defined multiple | 48 // Use anonymous namespace here to prevent the actions to be defined multiple |
49 // times across multiple test files. Sadly we can't use static for them. | 49 // times across multiple test files. Sadly we can't use static for them. |
50 namespace { | 50 namespace { |
51 | 51 |
52 ACTION_P(ReturnBuffer, buffer) { | 52 ACTION_P(ReturnBuffer, buffer) { |
53 arg0.Run(buffer ? DemuxerStream::kOk : DemuxerStream::kAborted, buffer); | 53 arg0.Run(buffer.get() ? DemuxerStream::kOk : DemuxerStream::kAborted, buffer); |
54 } | 54 } |
55 | 55 |
56 ACTION_P(RunCallbackIfNotNull, param) { | 56 ACTION_P(RunCallbackIfNotNull, param) { |
57 if (!arg0.is_null()) | 57 if (!arg0.is_null()) |
58 arg0.Run(param); | 58 arg0.Run(param); |
59 } | 59 } |
60 | 60 |
61 ACTION_P2(ResetAndRunCallback, callback, param) { | 61 ACTION_P2(ResetAndRunCallback, callback, param) { |
62 base::ResetAndReturn(callback).Run(param); | 62 base::ResetAndReturn(callback).Run(param); |
63 } | 63 } |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 | 578 |
579 // Test resetting after the decoder has been reset. | 579 // Test resetting after the decoder has been reset. |
580 TEST_F(DecryptingAudioDecoderTest, Reset_AfterReset) { | 580 TEST_F(DecryptingAudioDecoderTest, Reset_AfterReset) { |
581 Initialize(); | 581 Initialize(); |
582 EnterNormalDecodingState(); | 582 EnterNormalDecodingState(); |
583 Reset(); | 583 Reset(); |
584 Reset(); | 584 Reset(); |
585 } | 585 } |
586 | 586 |
587 } // namespace media | 587 } // namespace media |
OLD | NEW |