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

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

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 1328 matching lines...) Expand 10 before | Expand all | Expand 10 after
1339 1339
1340 // Rely on the slash at the end of the restriction. 1340 // Rely on the slash at the end of the restriction.
1341 EXPECT_TRUE(PathMatch("/search/something", "/search/")); 1341 EXPECT_TRUE(PathMatch("/search/something", "/search/"));
1342 EXPECT_TRUE(PathMatch("/search/s", "/search/")); 1342 EXPECT_TRUE(PathMatch("/search/s", "/search/"));
1343 EXPECT_TRUE(PathMatch("/search/other", "/search/")); 1343 EXPECT_TRUE(PathMatch("/search/other", "/search/"));
1344 EXPECT_TRUE(PathMatch("/search/something", "/search/")); 1344 EXPECT_TRUE(PathMatch("/search/something", "/search/"));
1345 1345
1346 // Make sure less that sufficient prefix match is false. 1346 // Make sure less that sufficient prefix match is false.
1347 EXPECT_FALSE(PathMatch("/sear", "/search")); 1347 EXPECT_FALSE(PathMatch("/sear", "/search"));
1348 EXPECT_FALSE(PathMatch("/", "/search")); 1348 EXPECT_FALSE(PathMatch("/", "/search"));
1349 EXPECT_FALSE(PathMatch("", "/search")); 1349 EXPECT_FALSE(PathMatch(std::string(), "/search"));
1350 1350
1351 // Add examples with several levels of direcories in the restriction. 1351 // Add examples with several levels of direcories in the restriction.
1352 EXPECT_FALSE(PathMatch("/search/something", "search/s")); 1352 EXPECT_FALSE(PathMatch("/search/something", "search/s"));
1353 EXPECT_FALSE(PathMatch("/search/", "/search/s")); 1353 EXPECT_FALSE(PathMatch("/search/", "/search/s"));
1354 1354
1355 // Make sure adding characters to path will also fail. 1355 // Make sure adding characters to path will also fail.
1356 EXPECT_FALSE(PathMatch("/searching", "/search/")); 1356 EXPECT_FALSE(PathMatch("/searching", "/search/"));
1357 EXPECT_FALSE(PathMatch("/searching", "/search")); 1357 EXPECT_FALSE(PathMatch("/searching", "/search"));
1358 1358
1359 // Make sure we're case sensitive. 1359 // Make sure we're case sensitive.
(...skipping 24 matching lines...) Expand all
1384 sdch_manager_->SetAllowLatencyExperiment(url, false); 1384 sdch_manager_->SetAllowLatencyExperiment(url, false);
1385 EXPECT_FALSE(sdch_manager_->AllowLatencyExperiment(url)); 1385 EXPECT_FALSE(sdch_manager_->AllowLatencyExperiment(url));
1386 EXPECT_TRUE(sdch_manager_->AllowLatencyExperiment(url2)); 1386 EXPECT_TRUE(sdch_manager_->AllowLatencyExperiment(url2));
1387 1387
1388 sdch_manager_->SetAllowLatencyExperiment(url2, false); 1388 sdch_manager_->SetAllowLatencyExperiment(url2, false);
1389 EXPECT_FALSE(sdch_manager_->AllowLatencyExperiment(url)); 1389 EXPECT_FALSE(sdch_manager_->AllowLatencyExperiment(url));
1390 EXPECT_FALSE(sdch_manager_->AllowLatencyExperiment(url2)); 1390 EXPECT_FALSE(sdch_manager_->AllowLatencyExperiment(url2));
1391 } 1391 }
1392 1392
1393 } // namespace net 1393 } // namespace net
OLDNEW
« no previous file with comments | « net/base/registry_controlled_domains/registry_controlled_domain_unittest.cc ('k') | net/cookies/canonical_cookie_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698