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

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

Issue 4192012: Convert implicit scoped_refptr constructor calls to explicit ones, part 1 (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: fix presubmit Created 10 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/callback.h" 7 #include "base/callback.h"
8 #include "base/format_macros.h" 8 #include "base/format_macros.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 url_format.SetAsString(media::MediaFormat::kMimeType, 601 url_format.SetAsString(media::MediaFormat::kMimeType,
602 media::mime_type::kURL); 602 media::mime_type::kURL);
603 url_format.SetAsString(media::MediaFormat::kURL, url); 603 url_format.SetAsString(media::MediaFormat::kURL, url);
604 data_source_ = new MockBufferedDataSource(MessageLoop::current(), 604 data_source_ = new MockBufferedDataSource(MessageLoop::current(),
605 bridge_factory_.get()); 605 bridge_factory_.get());
606 CHECK(data_source_); 606 CHECK(data_source_);
607 607
608 // There is no need to provide a message loop to data source. 608 // There is no need to provide a message loop to data source.
609 data_source_->set_host(&host_); 609 data_source_->set_host(&host_);
610 610
611 scoped_refptr<NiceMock<MockBufferedResourceLoader> > first_loader = 611 scoped_refptr<NiceMock<MockBufferedResourceLoader> > first_loader(
612 new NiceMock<MockBufferedResourceLoader>(); 612 new NiceMock<MockBufferedResourceLoader>());
613 613
614 // Creates the mock loader to be injected. 614 // Creates the mock loader to be injected.
615 loader_ = first_loader; 615 loader_ = first_loader;
616 616
617 bool initialized_ok = (error == net::OK); 617 bool initialized_ok = (error == net::OK);
618 bool loaded = networkState == LOADED; 618 bool loaded = networkState == LOADED;
619 { 619 {
620 InSequence s; 620 InSequence s;
621 ExpectCreateAndStartResourceLoader(error); 621 ExpectCreateAndStartResourceLoader(error);
622 622
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 StopDataSource(); 977 StopDataSource();
978 } 978 }
979 979
980 TEST_F(BufferedDataSourceTest, FileHasLoadedState) { 980 TEST_F(BufferedDataSourceTest, FileHasLoadedState) {
981 InitializeDataSource(kFileUrl, net::OK, true, 1024, LOADED); 981 InitializeDataSource(kFileUrl, net::OK, true, 1024, LOADED);
982 ReadDataSourceTimesOut(20, 10); 982 ReadDataSourceTimesOut(20, 10);
983 StopDataSource(); 983 StopDataSource();
984 } 984 }
985 985
986 } // namespace webkit_glue 986 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_path_manager.cc ('k') | webkit/glue/plugins/npapi_extension_thunk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698