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

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

Issue 100004: Hand craft an A/B test of SDCH compression... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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
« no previous file with comments | « net/base/sdch_filter.cc ('k') | net/base/sdch_manager.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 (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
(...skipping 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 EXPECT_FALSE(PathMatch("/search/", "/search/s")); 1177 EXPECT_FALSE(PathMatch("/search/", "/search/s"));
1178 1178
1179 // Make sure adding characters to path will also fail. 1179 // Make sure adding characters to path will also fail.
1180 EXPECT_FALSE(PathMatch("/searching", "/search/")); 1180 EXPECT_FALSE(PathMatch("/searching", "/search/"));
1181 EXPECT_FALSE(PathMatch("/searching", "/search")); 1181 EXPECT_FALSE(PathMatch("/searching", "/search"));
1182 1182
1183 // Make sure we're case sensitive. 1183 // Make sure we're case sensitive.
1184 EXPECT_FALSE(PathMatch("/ABC", "/abc")); 1184 EXPECT_FALSE(PathMatch("/ABC", "/abc"));
1185 EXPECT_FALSE(PathMatch("/abc", "/ABC")); 1185 EXPECT_FALSE(PathMatch("/abc", "/ABC"));
1186 } 1186 }
1187
1188 // The following are only applicable while we have a latency test in the code,
1189 // and can be removed when that functionality is stripped.
1190 TEST_F(SdchFilterTest, LatencyTestControls) {
1191 GURL url("http://www.google.com");
1192 GURL url2("http://www.google2.com");
1193
1194 // First make sure we default to false.
1195 EXPECT_FALSE(sdch_manager_->AllowLatencyExperiment(url));
1196 EXPECT_FALSE(sdch_manager_->AllowLatencyExperiment(url2));
1197
1198 // That we can set each to true.
1199 sdch_manager_->SetAllowLatencyExperiment(url, true);
1200 EXPECT_TRUE(sdch_manager_->AllowLatencyExperiment(url));
1201 EXPECT_FALSE(sdch_manager_->AllowLatencyExperiment(url2));
1202
1203 sdch_manager_->SetAllowLatencyExperiment(url2, true);
1204 EXPECT_TRUE(sdch_manager_->AllowLatencyExperiment(url));
1205 EXPECT_TRUE(sdch_manager_->AllowLatencyExperiment(url2));
1206
1207 // And can reset them to false.
1208 sdch_manager_->SetAllowLatencyExperiment(url, false);
1209 EXPECT_FALSE(sdch_manager_->AllowLatencyExperiment(url));
1210 EXPECT_TRUE(sdch_manager_->AllowLatencyExperiment(url2));
1211
1212 sdch_manager_->SetAllowLatencyExperiment(url2, false);
1213 EXPECT_FALSE(sdch_manager_->AllowLatencyExperiment(url));
1214 EXPECT_FALSE(sdch_manager_->AllowLatencyExperiment(url2));
1215 }
OLDNEW
« no previous file with comments | « net/base/sdch_filter.cc ('k') | net/base/sdch_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698