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

Side by Side Diff: media/base/pipeline_unittest.cc

Issue 10753021: Move AudioRenderer out of Filter heirarchy. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: docs Created 8 years, 5 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 | Annotate | Revision Log
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 #include <vector> 5 #include <vector>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/threading/simple_thread.h" 10 #include "base/threading/simple_thread.h"
(...skipping 29 matching lines...) Expand all
40 ACTION_P(InitializeDemuxerWithError, error) { 40 ACTION_P(InitializeDemuxerWithError, error) {
41 arg1.Run(error); 41 arg1.Run(error);
42 } 42 }
43 43
44 ACTION_P(SetDemuxerProperties, duration) { 44 ACTION_P(SetDemuxerProperties, duration) {
45 arg0->SetTotalBytes(kTotalBytes); 45 arg0->SetTotalBytes(kTotalBytes);
46 arg0->SetDuration(duration); 46 arg0->SetDuration(duration);
47 } 47 }
48 48
49 ACTION_P(DisableAudioRenderer, pipeline) { 49 ACTION_P(DisableAudioRenderer, pipeline) {
50 FilterHost* host = pipeline; 50 AudioRendererHost* host = pipeline;
51 host->DisableAudioRenderer(); 51 host->AudioRendererDisabled();
52 } 52 }
53 53
54 // Used for setting expectations on pipeline callbacks. Using a StrictMock 54 // Used for setting expectations on pipeline callbacks. Using a StrictMock
55 // also lets us test for missing callbacks. 55 // also lets us test for missing callbacks.
56 class CallbackHelper { 56 class CallbackHelper {
57 public: 57 public:
58 CallbackHelper() {} 58 CallbackHelper() {}
59 virtual ~CallbackHelper() {} 59 virtual ~CallbackHelper() {}
60 60
61 MOCK_METHOD1(OnStart, void(PipelineStatus)); 61 MOCK_METHOD1(OnStart, void(PipelineStatus));
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 TestPipelineStatusNotification(base::TimeDelta::FromMilliseconds(0)); 910 TestPipelineStatusNotification(base::TimeDelta::FromMilliseconds(0));
911 } 911 }
912 912
913 // Test that different-thread, some-delay callback (the expected common case) 913 // Test that different-thread, some-delay callback (the expected common case)
914 // works correctly. 914 // works correctly.
915 TEST(PipelineStatusNotificationTest, DelayedCallback) { 915 TEST(PipelineStatusNotificationTest, DelayedCallback) {
916 TestPipelineStatusNotification(base::TimeDelta::FromMilliseconds(20)); 916 TestPipelineStatusNotification(base::TimeDelta::FromMilliseconds(20));
917 } 917 }
918 918
919 } // namespace media 919 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698