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

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

Issue 399313006: Move bit_cast from base/macros.h to its own header (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: bit_cast spruce up+fix typo Created 4 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698