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

Unified Diff: third_party/WebKit/Source/core/fetch/MemoryCacheTest.cpp

Issue 1475003002: Remove an unused function from MemoryCache. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/fetch/MemoryCache.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/fetch/MemoryCacheTest.cpp
diff --git a/third_party/WebKit/Source/core/fetch/MemoryCacheTest.cpp b/third_party/WebKit/Source/core/fetch/MemoryCacheTest.cpp
index 2cd03344d1bdd1a1e894ede10e67b0aea4052207..e4fbc14efbfb5db6f61de70967daeb6437a8e85c 100644
--- a/third_party/WebKit/Source/core/fetch/MemoryCacheTest.cpp
+++ b/third_party/WebKit/Source/core/fetch/MemoryCacheTest.cpp
@@ -487,22 +487,6 @@ TEST_F(MemoryCacheTest, DecodeCacheOrder_MultipleResourceMaps)
}
}
-TEST_F(MemoryCacheTest, MultipleReplace)
-{
- ResourcePtr<FakeResource> resource1 = new FakeResource(ResourceRequest("http://test/resource"), Resource::Raw);
- memoryCache()->add(resource1.get());
-
- ResourcePtr<FakeResource> resource2 = new FakeResource(ResourceRequest("http://test/resource"), Resource::Raw);
- memoryCache()->replace(resource2.get(), resource1.get());
- EXPECT_TRUE(memoryCache()->contains(resource2.get()));
- EXPECT_FALSE(memoryCache()->contains(resource1.get()));
-
- ResourcePtr<FakeResource> resource3 = new FakeResource(ResourceRequest("http://test/resource"), Resource::Raw);
- memoryCache()->replace(resource3.get(), resource2.get());
- EXPECT_TRUE(memoryCache()->contains(resource3.get()));
- EXPECT_FALSE(memoryCache()->contains(resource2.get()));
-}
-
TEST_F(MemoryCacheTest, RemoveDuringRevalidation)
{
ResourcePtr<FakeResource> resource1 = new FakeResource(ResourceRequest("http://test/resource"), Resource::Raw);
@@ -519,11 +503,6 @@ TEST_F(MemoryCacheTest, RemoveDuringRevalidation)
memoryCache()->add(resource3.get());
EXPECT_TRUE(memoryCache()->contains(resource3.get()));
EXPECT_FALSE(memoryCache()->contains(resource2.get()));
-
- memoryCache()->replace(resource1.get(), resource2.get());
- EXPECT_TRUE(memoryCache()->contains(resource1.get()));
- EXPECT_FALSE(memoryCache()->contains(resource2.get()));
- EXPECT_FALSE(memoryCache()->contains(resource3.get()));
}
TEST_F(MemoryCacheTest, ResourceMapIsolation)
@@ -551,13 +530,6 @@ TEST_F(MemoryCacheTest, ResourceMapIsolation)
EXPECT_FALSE(memoryCache()->contains(resource2.get()));
EXPECT_TRUE(memoryCache()->contains(resource3.get()));
- ResourcePtr<FakeResource> resource4 = new FakeResource(ResourceRequest("http://test/resource"), Resource::Raw);
- resource4->setCacheIdentifier("foo");
- memoryCache()->replace(resource4.get(), resource3.get());
- EXPECT_TRUE(memoryCache()->contains(resource1.get()));
- EXPECT_FALSE(memoryCache()->contains(resource3.get()));
- EXPECT_TRUE(memoryCache()->contains(resource4.get()));
-
WillBeHeapVector<RawPtrWillBeMember<Resource>> resources = memoryCache()->resourcesForURL(url);
EXPECT_EQ(2u, resources.size());
« no previous file with comments | « third_party/WebKit/Source/core/fetch/MemoryCache.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698