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

Unified Diff: webkit/media/test_response_generator.cc

Issue 10698139: Write file:// tests for BufferedDataSource and fix some bugs as a result. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: what the Created 8 years, 5 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 | « webkit/media/test_response_generator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/test_response_generator.cc
diff --git a/webkit/media/test_response_generator.cc b/webkit/media/test_response_generator.cc
index d5485b38f83740260cb79d736b1eaa56484d805f..b2d605ca5967bdd163553f5c79a90a2f6632cc95 100644
--- a/webkit/media/test_response_generator.cc
+++ b/webkit/media/test_response_generator.cc
@@ -85,4 +85,17 @@ WebURLResponse TestResponseGenerator::Generate404() {
return response;
}
+WebURLResponse TestResponseGenerator::GenerateFileResponse(
+ int64 first_byte_offset) {
+ WebURLResponse response(gurl_);
+ response.setHTTPStatusCode(0);
+
+ if (first_byte_offset >= 0) {
+ response.setExpectedContentLength(content_length_ - first_byte_offset);
+ } else {
+ response.setExpectedContentLength(-1);
+ }
+ return response;
+}
+
} // namespace webkit_media
« no previous file with comments | « webkit/media/test_response_generator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698