summaryrefslogtreecommitdiffstats
path: root/content/browser/streams/stream_unittest.cc
diff options
context:
space:
mode:
authortyoshino@chromium.org <tyoshino@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-23 01:03:26 +0000
committertyoshino@chromium.org <tyoshino@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-23 01:03:26 +0000
commit7819b8725882113aec034756dd1b5c7ae02c3b58 (patch)
tree6672ed107496579537c7f516017cd06bd4cc9b98 /content/browser/streams/stream_unittest.cc
parent1f1fd6c86e57524b5a024dd10665941cebf4db51 (diff)
downloadchromium_src-7819b8725882113aec034756dd1b5c7ae02c3b58.zip
chromium_src-7819b8725882113aec034756dd1b5c7ae02c3b58.tar.gz
chromium_src-7819b8725882113aec034756dd1b5c7ae02c3b58.tar.bz2
Make Stream return STREAM_ABORTED to tell the reader it's failed.
Using this, StreamURLRequestJob aborts itself. For now, this value will be used to deal with memory limit exceed. data_bytes_read_ is moved using this opportunity since it's a part of temporary buffer consists of data_ and data_length_. BUG=169957 Review URL: https://chromiumcodereview.appspot.com/22942003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219170 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/streams/stream_unittest.cc')
-rw-r--r--content/browser/streams/stream_unittest.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/content/browser/streams/stream_unittest.cc b/content/browser/streams/stream_unittest.cc
index 2e0386b..a2d9593 100644
--- a/content/browser/streams/stream_unittest.cc
+++ b/content/browser/streams/stream_unittest.cc
@@ -65,6 +65,9 @@ class TestStreamReader : public StreamReadObserver {
case Stream::STREAM_EMPTY:
EXPECT_FALSE(completed_);
return;
+ case Stream::STREAM_ABORTED:
+ EXPECT_FALSE(completed_);
+ return;
}
size_t old_capacity = buffer_->capacity();
buffer_->SetCapacity(old_capacity + bytes_read);