OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <fstream> | 5 #include <fstream> |
6 #include <ostream> | 6 #include <ostream> |
7 | 7 |
8 #include "base/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
11 #include "net/base/io_buffer.h" | 11 #include "net/base/io_buffer.h" |
12 #include "net/filter/gzip_filter.h" | 12 #include "net/filter/gzip_filter.h" |
13 #include "net/filter/mock_filter_context.h" | 13 #include "net/filter/mock_filter_context.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 #include "testing/platform_test.h" | 15 #include "testing/platform_test.h" |
16 #include "third_party/zlib/zlib.h" | 16 #include "third_party/zlib/zlib.h" |
17 | 17 |
18 namespace { | 18 namespace { |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 int corrupt_decode_size = kDefaultBufferSize; | 378 int corrupt_decode_size = kDefaultBufferSize; |
379 | 379 |
380 int code = DecodeAllWithFilter(filter_.get(), corrupt_data, corrupt_data_len, | 380 int code = DecodeAllWithFilter(filter_.get(), corrupt_data, corrupt_data_len, |
381 corrupt_decode_buffer, &corrupt_decode_size); | 381 corrupt_decode_buffer, &corrupt_decode_size); |
382 | 382 |
383 // Expect failures | 383 // Expect failures |
384 EXPECT_TRUE(code == Filter::FILTER_ERROR); | 384 EXPECT_TRUE(code == Filter::FILTER_ERROR); |
385 } | 385 } |
386 | 386 |
387 } // namespace net | 387 } // namespace net |
OLD | NEW |