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

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

Issue 7484054: Migrate Pipeline & PipelineImpl to PipelineStatusCB. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix CR nits Created 9 years, 4 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
« no previous file with comments | « webkit/glue/media/buffered_data_source.cc ('k') | webkit/glue/media/simple_data_source.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) 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/test/test_timeouts.h" 7 #include "base/test/test_timeouts.h"
8 #include "media/base/mock_callback.h" 8 #include "media/base/mock_callback.h"
9 #include "media/base/mock_filter_host.h" 9 #include "media/base/mock_filter_host.h"
10 #include "media/base/mock_filters.h" 10 #include "media/base/mock_filters.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 } else { 189 } else {
190 EXPECT_CALL(host_, SetStreaming(true)); 190 EXPECT_CALL(host_, SetStreaming(true));
191 } 191 }
192 } else { 192 } else {
193 expected_init_status = media::PIPELINE_ERROR_NETWORK; 193 expected_init_status = media::PIPELINE_ERROR_NETWORK;
194 EXPECT_CALL(*loader_, Stop()); 194 EXPECT_CALL(*loader_, Stop());
195 } 195 }
196 196
197 // Actual initialization of the data source. 197 // Actual initialization of the data source.
198 data_source_->Initialize(url, 198 data_source_->Initialize(url,
199 media::NewExpectedStatusCallback(expected_init_status)); 199 media::NewExpectedStatusCB(expected_init_status));
200 message_loop_->RunAllPending(); 200 message_loop_->RunAllPending();
201 201
202 if (initialized_ok) { 202 if (initialized_ok) {
203 // Verify the size of the data source. 203 // Verify the size of the data source.
204 int64 size; 204 int64 size;
205 if (instance_size != -1 && (loaded || partial_response)) { 205 if (instance_size != -1 && (loaded || partial_response)) {
206 EXPECT_TRUE(data_source_->GetSize(&size)); 206 EXPECT_TRUE(data_source_->GetSize(&size));
207 EXPECT_EQ(instance_size, size); 207 EXPECT_EQ(instance_size, size);
208 } else { 208 } else {
209 EXPECT_TRUE(data_source_->IsStreaming()); 209 EXPECT_TRUE(data_source_->IsStreaming());
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 // single Read() request. 577 // single Read() request.
578 TEST_F(BufferedDataSourceTest, BoundedCacheMisses) { 578 TEST_F(BufferedDataSourceTest, BoundedCacheMisses) {
579 InitializeDataSource(kHttpUrl, net::OK, true, 1024, LOADING); 579 InitializeDataSource(kHttpUrl, net::OK, true, 1024, LOADING);
580 580
581 ReadDataSourceAlwaysCacheMiss(0, 10); 581 ReadDataSourceAlwaysCacheMiss(0, 10);
582 582
583 StopDataSource(); 583 StopDataSource();
584 } 584 }
585 585
586 } // namespace webkit_glue 586 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/media/buffered_data_source.cc ('k') | webkit/glue/media/simple_data_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698