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

Side by Side Diff: net/base/gzip_filter_unittest.cc

Issue 13052: Cleanup: move base/platform_test.h -> testing/ (Closed)
Patch Set: fix mark's comment Created 12 years 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 unified diff | Download patch
« no previous file with comments | « net/base/file_stream_unittest.cc ('k') | net/base/listen_socket_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/platform_test.h"
11 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
12 #include "net/base/gzip_filter.h" 11 #include "net/base/gzip_filter.h"
13 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 #include "testing/platform_test.h"
14 #include "third_party/zlib/zlib.h" 14 #include "third_party/zlib/zlib.h"
15 15
16 namespace { 16 namespace {
17 17
18 const int kDefaultBufferSize = 4096; 18 const int kDefaultBufferSize = 4096;
19 const int kSmallBufferSize = 128; 19 const int kSmallBufferSize = 128;
20 const int kMaxBufferSize = 1048576; // 1048576 == 2^20 == 1 MB 20 const int kMaxBufferSize = 1048576; // 1048576 == 2^20 == 1 MB
21 21
22 const char kApplicationOctetStream[] = "application/octet-stream"; 22 const char kApplicationOctetStream[] = "application/octet-stream";
23 const char kApplicationXGzip[] = "application/x-gzip"; 23 const char kApplicationXGzip[] = "application/x-gzip";
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 int corrupt_decode_size = kDefaultBufferSize; 379 int corrupt_decode_size = kDefaultBufferSize;
380 380
381 int code = DecodeAllWithFilter(filter.get(), corrupt_data, corrupt_data_len, 381 int code = DecodeAllWithFilter(filter.get(), corrupt_data, corrupt_data_len,
382 corrupt_decode_buffer, &corrupt_decode_size); 382 corrupt_decode_buffer, &corrupt_decode_size);
383 383
384 // Expect failures 384 // Expect failures
385 EXPECT_TRUE(code == Filter::FILTER_ERROR); 385 EXPECT_TRUE(code == Filter::FILTER_ERROR);
386 } 386 }
387 387
388 } // namespace 388 } // namespace
OLDNEW
« no previous file with comments | « net/base/file_stream_unittest.cc ('k') | net/base/listen_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698