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

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

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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
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 18 matching lines...) Expand all
29 */ 29 */
30 30
31 #include "core/fetch/MemoryCache.h" 31 #include "core/fetch/MemoryCache.h"
32 32
33 #include "core/fetch/MockResourceClients.h" 33 #include "core/fetch/MockResourceClients.h"
34 #include "core/fetch/RawResource.h" 34 #include "core/fetch/RawResource.h"
35 #include "platform/network/ResourceRequest.h" 35 #include "platform/network/ResourceRequest.h"
36 #include "platform/testing/UnitTestHelpers.h" 36 #include "platform/testing/UnitTestHelpers.h"
37 #include "public/platform/Platform.h" 37 #include "public/platform/Platform.h"
38 #include "testing/gtest/include/gtest/gtest.h" 38 #include "testing/gtest/include/gtest/gtest.h"
39 #include "wtf/OwnPtr.h"
40 39
41 namespace blink { 40 namespace blink {
42 41
43 class MemoryCacheTest : public ::testing::Test { 42 class MemoryCacheTest : public ::testing::Test {
44 public: 43 public:
45 class FakeDecodedResource : public Resource { 44 class FakeDecodedResource : public Resource {
46 public: 45 public:
47 static FakeDecodedResource* create(const ResourceRequest& request, Type type) 46 static FakeDecodedResource* create(const ResourceRequest& request, Type type)
48 { 47 {
49 return new FakeDecodedResource(request, type, ResourceLoaderOptions( )); 48 return new FakeDecodedResource(request, type, ResourceLoaderOptions( ));
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 419
421 HeapVector<Member<Resource>> resources = memoryCache()->resourcesForURL(url) ; 420 HeapVector<Member<Resource>> resources = memoryCache()->resourcesForURL(url) ;
422 EXPECT_EQ(2u, resources.size()); 421 EXPECT_EQ(2u, resources.size());
423 422
424 memoryCache()->evictResources(); 423 memoryCache()->evictResources();
425 EXPECT_FALSE(memoryCache()->contains(resource1)); 424 EXPECT_FALSE(memoryCache()->contains(resource1));
426 EXPECT_FALSE(memoryCache()->contains(resource3)); 425 EXPECT_FALSE(memoryCache()->contains(resource3));
427 } 426 }
428 427
429 } // namespace blink 428 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp ('k') | third_party/WebKit/Source/core/fetch/RawResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698