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

Unified Diff: content/browser/streams/stream_unittest.cc

Issue 16294003: Update content/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/streams/stream_registry.cc ('k') | content/browser/streams/stream_url_request_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/streams/stream_unittest.cc
diff --git a/content/browser/streams/stream_unittest.cc b/content/browser/streams/stream_unittest.cc
index 3452553ad6dc03b559bccd831fe2cbd3fe1d6346..e56f7aa410683916a03e253cf027de08e5864962 100644
--- a/content/browser/streams/stream_unittest.cc
+++ b/content/browser/streams/stream_unittest.cc
@@ -50,7 +50,7 @@ class TestStreamReader : public StreamReadObserver {
scoped_refptr<net::IOBuffer> buffer(new net::IOBuffer(kBufferSize));
int bytes_read = 0;
- while (stream->ReadRawData(buffer, kBufferSize, &bytes_read) ==
+ while (stream->ReadRawData(buffer.get(), kBufferSize, &bytes_read) ==
Stream::STREAM_HAS_DATA) {
size_t old_capacity = buffer_->capacity();
buffer_->SetCapacity(old_capacity + bytes_read);
@@ -135,9 +135,9 @@ TEST_F(StreamTest, Stream) {
const int kBufferSize = 1000000;
scoped_refptr<net::IOBuffer> buffer(NewIOBuffer(kBufferSize));
- writer.Write(stream, buffer, kBufferSize);
+ writer.Write(stream.get(), buffer, kBufferSize);
stream->Finalize();
- reader.Read(stream);
+ reader.Read(stream.get());
base::MessageLoop::current()->RunUntilIdle();
ASSERT_EQ(reader.buffer()->capacity(), kBufferSize);
@@ -165,7 +165,7 @@ TEST_F(StreamTest, GetStream_Missing) {
GURL url2("blob://stream2");
scoped_refptr<Stream> stream2 = registry_->GetStream(url2);
- ASSERT_FALSE(stream2);
+ ASSERT_FALSE(stream2.get());
}
TEST_F(StreamTest, CloneStream) {
@@ -192,7 +192,7 @@ TEST_F(StreamTest, CloneStream_Missing) {
GURL url3("blob://stream3");
ASSERT_FALSE(registry_->CloneStream(url2, url3));
scoped_refptr<Stream> stream2 = registry_->GetStream(url2);
- ASSERT_FALSE(stream2);
+ ASSERT_FALSE(stream2.get());
}
TEST_F(StreamTest, UnregisterStream) {
@@ -204,7 +204,7 @@ TEST_F(StreamTest, UnregisterStream) {
registry_->UnregisterStream(url);
scoped_refptr<Stream> stream2 = registry_->GetStream(url);
- ASSERT_FALSE(stream2);
+ ASSERT_FALSE(stream2.get());
}
} // namespace content
« no previous file with comments | « content/browser/streams/stream_registry.cc ('k') | content/browser/streams/stream_url_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698