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

Unified Diff: webkit/fileapi/file_writer_delegate_unittest.cc

Issue 9007055: Check response code before writing blob to file. (Closed) Base URL: git://localhost/chromium.git@master
Patch Set: '' Created 8 years, 12 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
Index: webkit/fileapi/file_writer_delegate_unittest.cc
diff --git a/webkit/fileapi/file_writer_delegate_unittest.cc b/webkit/fileapi/file_writer_delegate_unittest.cc
index d89a319a2b83181bfc079cb2bd418d1d020712a0..fd468743385d7d650e10d1c5ddb98c0fd5db2e5c 100644
--- a/webkit/fileapi/file_writer_delegate_unittest.cc
+++ b/webkit/fileapi/file_writer_delegate_unittest.cc
@@ -146,13 +146,14 @@ class FileWriterDelegateTestJob : public net::URLRequestJob {
cursor_(0) {
}
- void Start() {
+ virtual void Start() OVERRIDE {
MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&FileWriterDelegateTestJob::NotifyHeadersComplete, this));
}
- bool ReadRawData(net::IOBuffer* buf, int buf_size, int *bytes_read) {
+ virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int *bytes_read)
+ OVERRIDE {
if (remaining_bytes_ < buf_size)
buf_size = static_cast<int>(remaining_bytes_);
@@ -165,6 +166,10 @@ class FileWriterDelegateTestJob : public net::URLRequestJob {
return true;
}
+ virtual int GetResponseCode() const OVERRIDE {
+ return 200;
+ }
+
private:
std::string content_;
int remaining_bytes_;
« webkit/fileapi/file_writer_delegate.cc ('K') | « webkit/fileapi/file_writer_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698