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

Side by Side Diff: Source/core/fetch/MemoryCacheTest.cpp

Issue 1125733002: Oilpan: use transition type for MemoryCache::resourcesForURL()'s result. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
« no previous file with comments | « Source/core/fetch/MemoryCache.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013, Google Inc. All rights reserved. 2 * Copyright (c) 2013, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 EXPECT_FALSE(memoryCache()->contains(resource2.get())); 563 EXPECT_FALSE(memoryCache()->contains(resource2.get()));
564 EXPECT_TRUE(memoryCache()->contains(resource3.get())); 564 EXPECT_TRUE(memoryCache()->contains(resource3.get()));
565 565
566 ResourcePtr<FakeResource> resource4 = new FakeResource(ResourceRequest("http ://test/resource"), Resource::Raw); 566 ResourcePtr<FakeResource> resource4 = new FakeResource(ResourceRequest("http ://test/resource"), Resource::Raw);
567 resource4->setCacheIdentifier("foo"); 567 resource4->setCacheIdentifier("foo");
568 memoryCache()->replace(resource4.get(), resource3.get()); 568 memoryCache()->replace(resource4.get(), resource3.get());
569 EXPECT_TRUE(memoryCache()->contains(resource1.get())); 569 EXPECT_TRUE(memoryCache()->contains(resource1.get()));
570 EXPECT_FALSE(memoryCache()->contains(resource3.get())); 570 EXPECT_FALSE(memoryCache()->contains(resource3.get()));
571 EXPECT_TRUE(memoryCache()->contains(resource4.get())); 571 EXPECT_TRUE(memoryCache()->contains(resource4.get()));
572 572
573 WillBeHeapVector<Member<Resource>> resources = memoryCache()->resourcesForUR L(url); 573 WillBeHeapVector<RawPtrWillBeMember<Resource>> resources = memoryCache()->re sourcesForURL(url);
574 EXPECT_EQ(2u, resources.size()); 574 EXPECT_EQ(2u, resources.size());
575 575
576 memoryCache()->evictResources(); 576 memoryCache()->evictResources();
577 EXPECT_FALSE(memoryCache()->contains(resource1.get())); 577 EXPECT_FALSE(memoryCache()->contains(resource1.get()));
578 EXPECT_FALSE(memoryCache()->contains(resource3.get())); 578 EXPECT_FALSE(memoryCache()->contains(resource3.get()));
579 } 579 }
580 580
581 } // namespace 581 } // namespace
OLDNEW
« no previous file with comments | « Source/core/fetch/MemoryCache.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698