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/bit_cast.h" |
8 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
9 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
10 #include "base/path_service.h" | 11 #include "base/path_service.h" |
11 #include "net/base/io_buffer.h" | 12 #include "net/base/io_buffer.h" |
12 #include "net/filter/gzip_filter.h" | 13 #include "net/filter/gzip_filter.h" |
13 #include "net/filter/mock_filter_context.h" | 14 #include "net/filter/mock_filter_context.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
15 #include "testing/platform_test.h" | 16 #include "testing/platform_test.h" |
16 #include "third_party/zlib/zlib.h" | 17 #include "third_party/zlib/zlib.h" |
17 | 18 |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 int corrupt_decode_size = kDefaultBufferSize; | 379 int corrupt_decode_size = kDefaultBufferSize; |
379 | 380 |
380 int code = DecodeAllWithFilter(filter_.get(), corrupt_data, corrupt_data_len, | 381 int code = DecodeAllWithFilter(filter_.get(), corrupt_data, corrupt_data_len, |
381 corrupt_decode_buffer, &corrupt_decode_size); | 382 corrupt_decode_buffer, &corrupt_decode_size); |
382 | 383 |
383 // Expect failures | 384 // Expect failures |
384 EXPECT_TRUE(code == Filter::FILTER_ERROR); | 385 EXPECT_TRUE(code == Filter::FILTER_ERROR); |
385 } | 386 } |
386 | 387 |
387 } // namespace net | 388 } // namespace net |
OLD | NEW |