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

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

Issue 737943002: Update from https://crrev.com/304715 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/filter/filter.cc ('k') | net/filter/gzip_filter.h » ('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 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 "net/base/io_buffer.h" 5 #include "net/base/io_buffer.h"
6 #include "net/filter/filter.h" 6 #include "net/filter/filter.h"
7 #include "net/filter/mock_filter_context.h" 7 #include "net/filter/mock_filter_context.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace net { 10 namespace net {
11 11
12 namespace { 12 namespace {
13 13
14 class PassThroughFilter : public Filter { 14 class PassThroughFilter : public Filter {
15 public: 15 public:
16 PassThroughFilter() {} 16 PassThroughFilter() : Filter(FILTER_TYPE_UNSUPPORTED) {}
17 17
18 FilterStatus ReadFilteredData(char* dest_buffer, int* dest_len) override { 18 FilterStatus ReadFilteredData(char* dest_buffer, int* dest_len) override {
19 return CopyOut(dest_buffer, dest_len); 19 return CopyOut(dest_buffer, dest_len);
20 } 20 }
21 21
22 DISALLOW_COPY_AND_ASSIGN(PassThroughFilter); 22 DISALLOW_COPY_AND_ASSIGN(PassThroughFilter);
23 }; 23 };
24 24
25 } // namespace 25 } // namespace
26 26
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 amount_to_copy); 438 amount_to_copy);
439 filter1->FlushStreamBuffer(amount_to_copy); 439 filter1->FlushStreamBuffer(amount_to_copy);
440 read_array_index += amount_to_copy; 440 read_array_index += amount_to_copy;
441 } while (true); 441 } while (true);
442 442
443 EXPECT_EQ(read_array_index, input_array_size); 443 EXPECT_EQ(read_array_index, input_array_size);
444 EXPECT_EQ(compare_array_index, input_array_size); 444 EXPECT_EQ(compare_array_index, input_array_size);
445 } 445 }
446 446
447 } // Namespace net 447 } // Namespace net
OLDNEW
« no previous file with comments | « net/filter/filter.cc ('k') | net/filter/gzip_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698