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

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

Issue 115870: Reduce header dependencies in net/ (Closed)
Patch Set: Created 11 years, 6 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
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 <limits.h> 5 #include <limits.h>
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/scoped_ptr.h" 12 #include "base/scoped_ptr.h"
13 #include "net/base/filter.h" 13 #include "net/base/filter.h"
14 #include "net/base/filter_unittest.h" 14 #include "net/base/filter_unittest.h"
15 #include "net/base/io_buffer.h"
15 #include "net/base/sdch_filter.h" 16 #include "net/base/sdch_filter.h"
16 #include "net/url_request/url_request_http_job.cc" 17 #include "net/url_request/url_request_http_job.cc"
17 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
18 #include "third_party/zlib/zlib.h" 19 #include "third_party/zlib/zlib.h"
19 20
20 //------------------------------------------------------------------------------ 21 //------------------------------------------------------------------------------
21 // Provide sample data and compression results with a sample VCDIFF dictionary. 22 // Provide sample data and compression results with a sample VCDIFF dictionary.
22 // Note an SDCH dictionary has extra meta-data before the VCDIFF dictionary. 23 // Note an SDCH dictionary has extra meta-data before the VCDIFF dictionary.
23 static const char kTestVcdiffDictionary[] = "DictionaryFor" 24 static const char kTestVcdiffDictionary[] = "DictionaryFor"
24 "SdchCompression1SdchCompression2SdchCompression3SdchCompression\n"; 25 "SdchCompression1SdchCompression2SdchCompression3SdchCompression\n";
(...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1206 1207
1207 // And can reset them to false. 1208 // And can reset them to false.
1208 sdch_manager_->SetAllowLatencyExperiment(url, false); 1209 sdch_manager_->SetAllowLatencyExperiment(url, false);
1209 EXPECT_FALSE(sdch_manager_->AllowLatencyExperiment(url)); 1210 EXPECT_FALSE(sdch_manager_->AllowLatencyExperiment(url));
1210 EXPECT_TRUE(sdch_manager_->AllowLatencyExperiment(url2)); 1211 EXPECT_TRUE(sdch_manager_->AllowLatencyExperiment(url2));
1211 1212
1212 sdch_manager_->SetAllowLatencyExperiment(url2, false); 1213 sdch_manager_->SetAllowLatencyExperiment(url2, false);
1213 EXPECT_FALSE(sdch_manager_->AllowLatencyExperiment(url)); 1214 EXPECT_FALSE(sdch_manager_->AllowLatencyExperiment(url));
1214 EXPECT_FALSE(sdch_manager_->AllowLatencyExperiment(url2)); 1215 EXPECT_FALSE(sdch_manager_->AllowLatencyExperiment(url2));
1215 } 1216 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698