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

Side by Side Diff: webkit/media/buffered_data_source_unittest.cc

Issue 8566046: Fix test_shell_test breakage due to missing SetBufferedBytes expectation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/test/test_timeouts.h" 8 #include "base/test/test_timeouts.h"
9 #include "media/base/media_log.h" 9 #include "media/base/media_log.h"
10 #include "media/base/mock_callback.h" 10 #include "media/base/mock_callback.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 ON_CALL(*loader_, range_supported()) 185 ON_CALL(*loader_, range_supported())
186 .WillByDefault(Return(partial_response)); 186 .WillByDefault(Return(partial_response));
187 187
188 ON_CALL(*loader_, url()) 188 ON_CALL(*loader_, url())
189 .WillByDefault(ReturnRef(gurl_)); 189 .WillByDefault(ReturnRef(gurl_));
190 media::PipelineStatus expected_init_status = media::PIPELINE_OK; 190 media::PipelineStatus expected_init_status = media::PIPELINE_OK;
191 if (initialized_ok) { 191 if (initialized_ok) {
192 // Expected loaded or not. 192 // Expected loaded or not.
193 EXPECT_CALL(host_, SetLoaded(loaded)); 193 EXPECT_CALL(host_, SetLoaded(loaded));
194 194
195 if (instance_size != -1) { 195 if (instance_size != -1)
196 EXPECT_CALL(host_, SetTotalBytes(instance_size)); 196 EXPECT_CALL(host_, SetTotalBytes(instance_size));
197 if (loaded) 197
198 EXPECT_CALL(host_, SetBufferedBytes(instance_size)); 198 if (loaded)
199 else 199 EXPECT_CALL(host_, SetBufferedBytes(instance_size));
200 EXPECT_CALL(host_, SetBufferedBytes(0)); 200 else
201 } 201 EXPECT_CALL(host_, SetBufferedBytes(0));
202 202
203 if (!partial_response || instance_size == -1) 203 if (!partial_response || instance_size == -1)
204 EXPECT_CALL(host_, SetStreaming(true)); 204 EXPECT_CALL(host_, SetStreaming(true));
205 205
206 } else { 206 } else {
207 expected_init_status = media::PIPELINE_ERROR_NETWORK; 207 expected_init_status = media::PIPELINE_ERROR_NETWORK;
208 EXPECT_CALL(*loader_, Stop()); 208 EXPECT_CALL(*loader_, Stop());
209 } 209 }
210 210
211 // Actual initialization of the data source. 211 // Actual initialization of the data source.
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 message_loop_->RunAllPending(); 783 message_loop_->RunAllPending();
784 784
785 // Verify loader changed but still has same bitrate. 785 // Verify loader changed but still has same bitrate.
786 EXPECT_NE(old_loader, data_source_->loader().get()); 786 EXPECT_NE(old_loader, data_source_->loader().get());
787 EXPECT_EQ(2.0f, loader_playback_rate()); 787 EXPECT_EQ(2.0f, loader_playback_rate());
788 788
789 StopDataSource(); 789 StopDataSource();
790 } 790 }
791 791
792 } // namespace webkit_media 792 } // namespace webkit_media
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698