Index: third_party/WebKit/Source/core/fetch/ResourceTest.cpp |
diff --git a/third_party/WebKit/Source/core/fetch/ResourceTest.cpp b/third_party/WebKit/Source/core/fetch/ResourceTest.cpp |
index 3795f72d1cc1bcfd5c64d4980545bbcf718c7c40..a3189b0468c6e745b66c3d0427b89637eddc3243 100644 |
--- a/third_party/WebKit/Source/core/fetch/ResourceTest.cpp |
+++ b/third_party/WebKit/Source/core/fetch/ResourceTest.cpp |
@@ -13,6 +13,7 @@ |
#include "platform/testing/URLTestHelpers.h" |
#include "public/platform/Platform.h" |
#include "testing/gtest/include/gtest/gtest.h" |
+#include "wtf/PtrUtil.h" |
#include "wtf/Vector.h" |
namespace blink { |
@@ -55,20 +56,22 @@ void createTestResourceAndSetCachedMetadata(const ResourceResponse& response) { |
} // anonymous namespace |
TEST(ResourceTest, SetCachedMetadata_SendsMetadataToPlatform) { |
- MockPlatform mock; |
+ ScopedTestingPlatformSupport<MockPlatform> mock( |
+ WTF::makeUnique<MockPlatform>()); |
ResourceResponse response(createTestResourceResponse()); |
createTestResourceAndSetCachedMetadata(response); |
- EXPECT_EQ(1u, mock.cachedURLs().size()); |
+ EXPECT_EQ(1u, mock->cachedURLs().size()); |
} |
TEST( |
ResourceTest, |
SetCachedMetadata_DoesNotSendMetadataToPlatformWhenFetchedViaServiceWorker) { |
- MockPlatform mock; |
+ ScopedTestingPlatformSupport<MockPlatform> mock( |
+ WTF::makeUnique<MockPlatform>()); |
ResourceResponse response(createTestResourceResponse()); |
response.setWasFetchedViaServiceWorker(true); |
createTestResourceAndSetCachedMetadata(response); |
- EXPECT_EQ(0u, mock.cachedURLs().size()); |
+ EXPECT_EQ(0u, mock->cachedURLs().size()); |
} |
TEST(ResourceTest, RevalidateWithFragment) { |