Index: third_party/WebKit/Source/platform/weborigin/OriginAccessEntryTest.cpp |
diff --git a/third_party/WebKit/Source/platform/weborigin/OriginAccessEntryTest.cpp b/third_party/WebKit/Source/platform/weborigin/OriginAccessEntryTest.cpp |
index 6803b555ce76a4fe8846413daa41166221c945b1..b86a333c6e0be25bddd2cd017f2108107fb11084 100644 |
--- a/third_party/WebKit/Source/platform/weborigin/OriginAccessEntryTest.cpp |
+++ b/third_party/WebKit/Source/platform/weborigin/OriginAccessEntryTest.cpp |
@@ -68,8 +68,9 @@ class OriginAccessEntryTestPlatform : public TestingPlatformSupport { |
}; |
TEST(OriginAccessEntryTest, PublicSuffixListTest) { |
- OriginAccessEntryTestPlatform platform; |
- platform.setPublicSuffix("com"); |
+ ScopedTestingPlatformSupport<OriginAccessEntryTestPlatform> platform( |
+ new OriginAccessEntryTestPlatform); |
+ platform->setPublicSuffix("com"); |
RefPtr<SecurityOrigin> origin = |
SecurityOrigin::createFromString("http://www.google.com"); |
@@ -135,8 +136,9 @@ TEST(OriginAccessEntryTest, AllowSubdomainsTest) { |
OriginAccessEntry::DoesNotMatchOrigin, OriginAccessEntry::MatchesOrigin}, |
}; |
- OriginAccessEntryTestPlatform platform; |
- platform.setPublicSuffix("com"); |
+ ScopedTestingPlatformSupport<OriginAccessEntryTestPlatform> platform( |
+ new OriginAccessEntryTestPlatform); |
+ platform->setPublicSuffix("com"); |
for (const auto& test : inputs) { |
SCOPED_TRACE(testing::Message() << "Host: " << test.host |
@@ -189,8 +191,9 @@ TEST(OriginAccessEntryTest, AllowRegisterableDomainsTest) { |
OriginAccessEntry::DoesNotMatchOrigin}, |
}; |
- OriginAccessEntryTestPlatform platform; |
- platform.setPublicSuffix("com"); |
+ ScopedTestingPlatformSupport<OriginAccessEntryTestPlatform> platform( |
+ new OriginAccessEntryTestPlatform); |
+ platform->setPublicSuffix("com"); |
for (const auto& test : inputs) { |
RefPtr<SecurityOrigin> originToTest = |
@@ -245,8 +248,9 @@ TEST(OriginAccessEntryTest, AllowRegisterableDomainsTestWithDottedSuffix) { |
OriginAccessEntry::DoesNotMatchOrigin}, |
}; |
- OriginAccessEntryTestPlatform platform; |
- platform.setPublicSuffix("appspot.com"); |
+ ScopedTestingPlatformSupport<OriginAccessEntryTestPlatform> platform( |
+ new OriginAccessEntryTestPlatform); |
+ platform->setPublicSuffix("appspot.com"); |
for (const auto& test : inputs) { |
RefPtr<SecurityOrigin> originToTest = |
@@ -296,8 +300,9 @@ TEST(OriginAccessEntryTest, DisallowSubdomainsTest) { |
OriginAccessEntry::DoesNotMatchOrigin}, |
}; |
- OriginAccessEntryTestPlatform platform; |
- platform.setPublicSuffix("com"); |
+ ScopedTestingPlatformSupport<OriginAccessEntryTestPlatform> platform( |
+ new OriginAccessEntryTestPlatform); |
+ platform->setPublicSuffix("com"); |
for (const auto& test : inputs) { |
SCOPED_TRACE(testing::Message() << "Host: " << test.host |
@@ -327,8 +332,9 @@ TEST(OriginAccessEntryTest, IPAddressTest) { |
{"http", "", false}, |
}; |
- OriginAccessEntryTestPlatform platform; |
- platform.setPublicSuffix("com"); |
+ ScopedTestingPlatformSupport<OriginAccessEntryTestPlatform> platform( |
+ new OriginAccessEntryTestPlatform); |
+ platform->setPublicSuffix("com"); |
for (const auto& test : inputs) { |
SCOPED_TRACE(testing::Message() << "Host: " << test.host); |
@@ -355,8 +361,9 @@ TEST(OriginAccessEntryTest, IPAddressMatchingTest) { |
OriginAccessEntry::DoesNotMatchOrigin}, |
}; |
- OriginAccessEntryTestPlatform platform; |
- platform.setPublicSuffix("com"); |
+ ScopedTestingPlatformSupport<OriginAccessEntryTestPlatform> platform( |
+ new OriginAccessEntryTestPlatform); |
+ platform->setPublicSuffix("com"); |
for (const auto& test : inputs) { |
SCOPED_TRACE(testing::Message() << "Host: " << test.host |