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

Side by Side Diff: media/base/test_helpers.h

Issue 1906423005: Replace scoped_ptr with std::unique_ptr in //media/base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-media-base: android Created 4 years, 7 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
« no previous file with comments | « media/base/test_data_util.h ('k') | media/base/text_renderer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef MEDIA_BASE_TEST_HELPERS_H_ 5 #ifndef MEDIA_BASE_TEST_HELPERS_H_
6 #define MEDIA_BASE_TEST_HELPERS_H_ 6 #define MEDIA_BASE_TEST_HELPERS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <memory>
9 10
10 #include "base/callback.h" 11 #include "base/callback.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "media/base/audio_parameters.h" 13 #include "media/base/audio_parameters.h"
13 #include "media/base/channel_layout.h" 14 #include "media/base/channel_layout.h"
14 #include "media/base/media_log.h" 15 #include "media/base/media_log.h"
15 #include "media/base/pipeline_status.h" 16 #include "media/base/pipeline_status.h"
16 #include "media/base/sample_format.h" 17 #include "media/base/sample_format.h"
17 #include "media/base/video_decoder_config.h" 18 #include "media/base/video_decoder_config.h"
18 #include "testing/gmock/include/gmock/gmock.h" 19 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 61
61 bool is_signaled() const { return signaled_; } 62 bool is_signaled() const { return signaled_; }
62 63
63 private: 64 private:
64 void OnCallback(PipelineStatus status); 65 void OnCallback(PipelineStatus status);
65 void OnTimeout(); 66 void OnTimeout();
66 67
67 base::MessageLoop* message_loop_; 68 base::MessageLoop* message_loop_;
68 bool signaled_; 69 bool signaled_;
69 PipelineStatus status_; 70 PipelineStatus status_;
70 scoped_ptr<base::RunLoop> run_loop_; 71 std::unique_ptr<base::RunLoop> run_loop_;
71 72
72 DISALLOW_COPY_AND_ASSIGN(WaitableMessageLoopEvent); 73 DISALLOW_COPY_AND_ASSIGN(WaitableMessageLoopEvent);
73 }; 74 };
74 75
75 // Provides pre-canned VideoDecoderConfig. These types are used for tests that 76 // Provides pre-canned VideoDecoderConfig. These types are used for tests that
76 // don't care about detailed parameters of the config. 77 // don't care about detailed parameters of the config.
77 class TestVideoConfig { 78 class TestVideoConfig {
78 public: 79 public:
79 // Returns a configuration that is invalid. 80 // Returns a configuration that is invalid.
80 static VideoDecoderConfig Invalid(); 81 static VideoDecoderConfig Invalid();
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 base::TimeDelta timestamp, 140 base::TimeDelta timestamp,
140 base::TimeDelta duration); 141 base::TimeDelta duration);
141 142
142 // Verify if a fake video DecoderBuffer is valid. 143 // Verify if a fake video DecoderBuffer is valid.
143 bool VerifyFakeVideoBufferForTest(const scoped_refptr<DecoderBuffer>& buffer, 144 bool VerifyFakeVideoBufferForTest(const scoped_refptr<DecoderBuffer>& buffer,
144 const VideoDecoderConfig& config); 145 const VideoDecoderConfig& config);
145 146
146 } // namespace media 147 } // namespace media
147 148
148 #endif // MEDIA_BASE_TEST_HELPERS_H_ 149 #endif // MEDIA_BASE_TEST_HELPERS_H_
OLDNEW
« no previous file with comments | « media/base/test_data_util.h ('k') | media/base/text_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698