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

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

Issue 1083383005: Connect the new video rendering path to the compositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@vra
Patch Set: Update LoginCustomFlags histogram. Created 5 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/null_video_sink.h ('k') | media/base/video_renderer_sink.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 "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "media/base/channel_layout.h" 10 #include "media/base/channel_layout.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // 46 //
47 // Fails the test if the timeout is reached. 47 // Fails the test if the timeout is reached.
48 void RunAndWait(); 48 void RunAndWait();
49 49
50 // Runs the current message loop until |this| has been signaled and asserts 50 // Runs the current message loop until |this| has been signaled and asserts
51 // that the |expected| status was received. 51 // that the |expected| status was received.
52 // 52 //
53 // Fails the test if the timeout is reached. 53 // Fails the test if the timeout is reached.
54 void RunAndWaitForStatus(PipelineStatus expected); 54 void RunAndWaitForStatus(PipelineStatus expected);
55 55
56 bool is_signaled() const { return signaled_; }
57
56 private: 58 private:
57 void OnCallback(PipelineStatus status); 59 void OnCallback(PipelineStatus status);
58 void OnTimeout(); 60 void OnTimeout();
59 61
60 base::MessageLoop* message_loop_; 62 base::MessageLoop* message_loop_;
61 bool signaled_; 63 bool signaled_;
62 PipelineStatus status_; 64 PipelineStatus status_;
63 65
64 DISALLOW_COPY_AND_ASSIGN(WaitableMessageLoopEvent); 66 DISALLOW_COPY_AND_ASSIGN(WaitableMessageLoopEvent);
65 }; 67 };
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 }; 142 };
141 143
142 // Test implementation of a media log LogCB that sends media log messages to 144 // Test implementation of a media log LogCB that sends media log messages to
143 // DVLOG(1). 145 // DVLOG(1).
144 void AddLogEntryForTest(MediaLog::MediaLogLevel level, 146 void AddLogEntryForTest(MediaLog::MediaLogLevel level,
145 const std::string& message); 147 const std::string& message);
146 148
147 } // namespace media 149 } // namespace media
148 150
149 #endif // MEDIA_BASE_TEST_HELPERS_H_ 151 #endif // MEDIA_BASE_TEST_HELPERS_H_
OLDNEW
« no previous file with comments | « media/base/null_video_sink.h ('k') | media/base/video_renderer_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698