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

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

Issue 6639002: Put Filter into namespace net. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Responded to comments from tfarina Created 9 years, 9 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 (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2011 The Chromium Authors. All rights reserved.
tfarina 2011/03/08 21:41:05 That should be just 2011. So 2006-2011 -> 2011.
adamk 2011/03/08 21:53:10 Done.
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/filter.h" 5 #include "net/base/filter.h"
6 #include "net/base/mock_filter_context.h" 6 #include "net/base/mock_filter_context.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace net {
10
9 class FilterTest : public testing::Test { 11 class FilterTest : public testing::Test {
10 }; 12 };
11 13
12 TEST(FilterTest, ContentTypeId) { 14 TEST(FilterTest, ContentTypeId) {
13 // Check for basic translation of Content-Encoding, including case variations. 15 // Check for basic translation of Content-Encoding, including case variations.
14 EXPECT_EQ(Filter::FILTER_TYPE_DEFLATE, 16 EXPECT_EQ(Filter::FILTER_TYPE_DEFLATE,
15 Filter::ConvertEncodingToType("deflate")); 17 Filter::ConvertEncodingToType("deflate"));
16 EXPECT_EQ(Filter::FILTER_TYPE_DEFLATE, 18 EXPECT_EQ(Filter::FILTER_TYPE_DEFLATE,
17 Filter::ConvertEncodingToType("deflAte")); 19 Filter::ConvertEncodingToType("deflAte"));
18 EXPECT_EQ(Filter::FILTER_TYPE_GZIP, 20 EXPECT_EQ(Filter::FILTER_TYPE_GZIP,
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 339
338 // Except on downloads, where they just get saved. 340 // Except on downloads, where they just get saved.
339 encoding_types.clear(); 341 encoding_types.clear();
340 encoding_types.push_back(Filter::FILTER_TYPE_GZIP); 342 encoding_types.push_back(Filter::FILTER_TYPE_GZIP);
341 filter_context.SetDownload(true); 343 filter_context.SetDownload(true);
342 filter_context.SetMimeType(kHtmlMime); 344 filter_context.SetMimeType(kHtmlMime);
343 filter_context.SetURL(GURL(kGzUrl)); 345 filter_context.SetURL(GURL(kGzUrl));
344 Filter::FixupEncodingTypes(filter_context, &encoding_types); 346 Filter::FixupEncodingTypes(filter_context, &encoding_types);
345 EXPECT_TRUE(encoding_types.empty()); 347 EXPECT_TRUE(encoding_types.empty());
346 } 348 }
349
350 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698