Index: net/base/sdch_manager_unittest.cc |
diff --git a/net/base/sdch_manager_unittest.cc b/net/base/sdch_manager_unittest.cc |
index 2a08d468a077bdcd62f44d26af1532fddc90b7cd..e42a4d2bb8ef38ba6f0f76e6f49380ae2b5a0fc5 100644 |
--- a/net/base/sdch_manager_unittest.cc |
+++ b/net/base/sdch_manager_unittest.cc |
@@ -419,46 +419,6 @@ TEST_F(SdchManagerTest, CanStillSetExactMatchDictionary) { |
GURL("http://" + dictionary_domain))); |
} |
-TEST_F(SdchManagerTest, PathMatch) { |
- bool (*PathMatch)(const std::string& path, const std::string& restriction) = |
- SdchManager::Dictionary::PathMatch; |
- // Perfect match is supported. |
- EXPECT_TRUE(PathMatch("/search", "/search")); |
- EXPECT_TRUE(PathMatch("/search/", "/search/")); |
- |
- // Prefix only works if last character of restriction is a slash, or first |
- // character in path after a match is a slash. Validate each case separately. |
- |
- // Rely on the slash in the path (not at the end of the restriction). |
- EXPECT_TRUE(PathMatch("/search/something", "/search")); |
- EXPECT_TRUE(PathMatch("/search/s", "/search")); |
- EXPECT_TRUE(PathMatch("/search/other", "/search")); |
- EXPECT_TRUE(PathMatch("/search/something", "/search")); |
- |
- // Rely on the slash at the end of the restriction. |
- EXPECT_TRUE(PathMatch("/search/something", "/search/")); |
- EXPECT_TRUE(PathMatch("/search/s", "/search/")); |
- EXPECT_TRUE(PathMatch("/search/other", "/search/")); |
- EXPECT_TRUE(PathMatch("/search/something", "/search/")); |
- |
- // Make sure less that sufficient prefix match is false. |
- EXPECT_FALSE(PathMatch("/sear", "/search")); |
- EXPECT_FALSE(PathMatch("/", "/search")); |
- EXPECT_FALSE(PathMatch(std::string(), "/search")); |
- |
- // Add examples with several levels of direcories in the restriction. |
- EXPECT_FALSE(PathMatch("/search/something", "search/s")); |
- EXPECT_FALSE(PathMatch("/search/", "/search/s")); |
- |
- // Make sure adding characters to path will also fail. |
- EXPECT_FALSE(PathMatch("/searching", "/search/")); |
- EXPECT_FALSE(PathMatch("/searching", "/search")); |
- |
- // Make sure we're case sensitive. |
- EXPECT_FALSE(PathMatch("/ABC", "/abc")); |
- EXPECT_FALSE(PathMatch("/abc", "/ABC")); |
-} |
- |
// The following are only applicable while we have a latency test in the code, |
// and can be removed when that functionality is stripped. |
TEST_F(SdchManagerTest, LatencyTestControls) { |
@@ -636,9 +596,8 @@ TEST_F(SdchManagerTest, ExpirationCheckedProperly) { |
target_gurl, server_hash, &problem_code).Pass()); |
ASSERT_TRUE(hash_set); |
ASSERT_EQ(SDCH_OK, problem_code); |
- const_cast<SdchManager::Dictionary*>( |
- hash_set->GetDictionary(server_hash))->SetClockForTesting( |
- clock.Pass()); |
+ const_cast<SdchDictionary*>(hash_set->GetDictionary(server_hash)) |
+ ->SetClockForTesting(clock.Pass()); |
// Make sure it's not visible for advertisement, but is visible |
// if looked up by hash. |