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

Unified Diff: net/base/filter_unittest.cc

Issue 6516025: Remove GetInputStreamBufferSize() method from FilterContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add some sanity checks Created 9 years, 10 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 | « net/base/filter.cc ('k') | net/base/gzip_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/filter_unittest.cc
diff --git a/net/base/filter_unittest.cc b/net/base/filter_unittest.cc
index c65c3de8c77b98fd3f37ebd8ed1abe4b11ba460c..9c20d699944bb9b92ca4859ecb2f0c4f5d92055b 100644
--- a/net/base/filter_unittest.cc
+++ b/net/base/filter_unittest.cc
@@ -35,8 +35,7 @@ TEST(FilterTest, ContentTypeId) {
// Check various fixups that modify content encoding lists.
TEST(FilterTest, ApacheGzip) {
- const int kInputBufferSize(100);
- net::MockFilterContext filter_context(kInputBufferSize);
+ net::MockFilterContext filter_context;
filter_context.SetSdchResponse(false);
// Check that redundant gzip mime type removes only solo gzip encoding.
@@ -84,8 +83,7 @@ TEST(FilterTest, ApacheGzip) {
TEST(FilterTest, SdchEncoding) {
// Handle content encodings including SDCH.
const std::string kTextHtmlMime("text/html");
- const int kInputBufferSize(100);
- net::MockFilterContext filter_context(kInputBufferSize);
+ net::MockFilterContext filter_context;
filter_context.SetSdchResponse(true);
std::vector<Filter::FilterType> encoding_types;
@@ -122,8 +120,7 @@ TEST(FilterTest, SdchEncoding) {
TEST(FilterTest, MissingSdchEncoding) {
// Handle interesting case where entire SDCH encoding assertion "got lost."
const std::string kTextHtmlMime("text/html");
- const int kInputBufferSize(100);
- net::MockFilterContext filter_context(kInputBufferSize);
+ net::MockFilterContext filter_context;
filter_context.SetSdchResponse(true);
std::vector<Filter::FilterType> encoding_types;
@@ -158,8 +155,7 @@ TEST(FilterTest, MissingSdchEncoding) {
}
TEST(FilterTest, Svgz) {
- const int kInputBufferSize(100);
- net::MockFilterContext filter_context(kInputBufferSize);
+ net::MockFilterContext filter_context;
// Check that svgz files are only decompressed when not downloading.
const std::string kSvgzMime("image/svg+xml");
@@ -207,8 +203,7 @@ TEST(FilterTest, Svgz) {
TEST(FilterTest, UnsupportedMimeGzip) {
// From issue 8170 - handling files with Content-Encoding: x-gzip
- const int kInputBufferSize(100);
- net::MockFilterContext filter_context(kInputBufferSize);
+ net::MockFilterContext filter_context;
std::vector<Filter::FilterType> encoding_types;
const std::string kTarMime("application/x-tar");
const std::string kCpioMime("application/x-cpio");
@@ -295,8 +290,7 @@ TEST(FilterTest, UnsupportedMimeGzip) {
TEST(FilterTest, SupportedMimeGzip) {
// From issue 16430 - Files with supported mime types should be decompressed,
// even though these files end in .gz/.tgz.
- const int kInputBufferSize(100);
- net::MockFilterContext filter_context(kInputBufferSize);
+ net::MockFilterContext filter_context;
std::vector<Filter::FilterType> encoding_types;
const std::string kGzUrl("http://ignore.com/foo.gz");
const std::string kUrl("http://ignore.com/foo");
« no previous file with comments | « net/base/filter.cc ('k') | net/base/gzip_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698