OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <iostream> | 6 #include <iostream> |
7 | 7 |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
11 #include "net/base/bzip2_filter.h" | 11 #include "net/base/bzip2_filter.h" |
12 #include "net/base/filter_unittest.h" | 12 #include "net/base/filter_unittest.h" |
| 13 #include "net/base/io_buffer.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
14 #include "testing/platform_test.h" | 15 #include "testing/platform_test.h" |
15 #include "third_party/bzip2/bzlib.h" | 16 #include "third_party/bzip2/bzlib.h" |
16 | 17 |
17 namespace { | 18 namespace { |
18 | 19 |
19 const char* kExtraData = "Test Data, More Test Data, Even More Data of Test"; | 20 const char* kExtraData = "Test Data, More Test Data, Even More Data of Test"; |
20 const int kExtraDataBufferSize = 49; | 21 const int kExtraDataBufferSize = 49; |
21 const int kDefaultBufferSize = 4096; | 22 const int kDefaultBufferSize = 4096; |
22 const int kSmallBufferSize = 128; | 23 const int kSmallBufferSize = 128; |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 DecodeAndCompareWithFilter(filter.get(), | 392 DecodeAndCompareWithFilter(filter.get(), |
392 source_buffer(), | 393 source_buffer(), |
393 source_len() + kExtraDataBufferSize, | 394 source_len() + kExtraDataBufferSize, |
394 more_data, | 395 more_data, |
395 more_data_len, | 396 more_data_len, |
396 kDefaultBufferSize, | 397 kDefaultBufferSize, |
397 true); | 398 true); |
398 } | 399 } |
399 | 400 |
400 } // namespace | 401 } // namespace |
OLD | NEW |