| 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..3059445b88ea3cc5eff036614e35e5cd48495a5c 100644
|
| --- a/third_party/WebKit/Source/platform/weborigin/OriginAccessEntryTest.cpp
|
| +++ b/third_party/WebKit/Source/platform/weborigin/OriginAccessEntryTest.cpp
|
| @@ -36,6 +36,7 @@
|
| #include "public/platform/Platform.h"
|
| #include "public/platform/WebPublicSuffixList.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| +#include "wtf/PtrUtil.h"
|
|
|
| namespace blink {
|
|
|
| @@ -68,8 +69,9 @@ class OriginAccessEntryTestPlatform : public TestingPlatformSupport {
|
| };
|
|
|
| TEST(OriginAccessEntryTest, PublicSuffixListTest) {
|
| - OriginAccessEntryTestPlatform platform;
|
| - platform.setPublicSuffix("com");
|
| + ScopedTestingPlatformSupport<OriginAccessEntryTestPlatform> platform(
|
| + WTF::makeUnique<OriginAccessEntryTestPlatform>());
|
| + platform->setPublicSuffix("com");
|
|
|
| RefPtr<SecurityOrigin> origin =
|
| SecurityOrigin::createFromString("http://www.google.com");
|
| @@ -135,8 +137,9 @@ TEST(OriginAccessEntryTest, AllowSubdomainsTest) {
|
| OriginAccessEntry::DoesNotMatchOrigin, OriginAccessEntry::MatchesOrigin},
|
| };
|
|
|
| - OriginAccessEntryTestPlatform platform;
|
| - platform.setPublicSuffix("com");
|
| + ScopedTestingPlatformSupport<OriginAccessEntryTestPlatform> platform(
|
| + WTF::makeUnique<OriginAccessEntryTestPlatform>());
|
| + platform->setPublicSuffix("com");
|
|
|
| for (const auto& test : inputs) {
|
| SCOPED_TRACE(testing::Message() << "Host: " << test.host
|
| @@ -189,8 +192,9 @@ TEST(OriginAccessEntryTest, AllowRegisterableDomainsTest) {
|
| OriginAccessEntry::DoesNotMatchOrigin},
|
| };
|
|
|
| - OriginAccessEntryTestPlatform platform;
|
| - platform.setPublicSuffix("com");
|
| + ScopedTestingPlatformSupport<OriginAccessEntryTestPlatform> platform(
|
| + WTF::makeUnique<OriginAccessEntryTestPlatform>());
|
| + platform->setPublicSuffix("com");
|
|
|
| for (const auto& test : inputs) {
|
| RefPtr<SecurityOrigin> originToTest =
|
| @@ -245,8 +249,9 @@ TEST(OriginAccessEntryTest, AllowRegisterableDomainsTestWithDottedSuffix) {
|
| OriginAccessEntry::DoesNotMatchOrigin},
|
| };
|
|
|
| - OriginAccessEntryTestPlatform platform;
|
| - platform.setPublicSuffix("appspot.com");
|
| + ScopedTestingPlatformSupport<OriginAccessEntryTestPlatform> platform(
|
| + WTF::makeUnique<OriginAccessEntryTestPlatform>());
|
| + platform->setPublicSuffix("appspot.com");
|
|
|
| for (const auto& test : inputs) {
|
| RefPtr<SecurityOrigin> originToTest =
|
| @@ -296,8 +301,9 @@ TEST(OriginAccessEntryTest, DisallowSubdomainsTest) {
|
| OriginAccessEntry::DoesNotMatchOrigin},
|
| };
|
|
|
| - OriginAccessEntryTestPlatform platform;
|
| - platform.setPublicSuffix("com");
|
| + ScopedTestingPlatformSupport<OriginAccessEntryTestPlatform> platform(
|
| + WTF::makeUnique<OriginAccessEntryTestPlatform>());
|
| + platform->setPublicSuffix("com");
|
|
|
| for (const auto& test : inputs) {
|
| SCOPED_TRACE(testing::Message() << "Host: " << test.host
|
| @@ -327,8 +333,9 @@ TEST(OriginAccessEntryTest, IPAddressTest) {
|
| {"http", "", false},
|
| };
|
|
|
| - OriginAccessEntryTestPlatform platform;
|
| - platform.setPublicSuffix("com");
|
| + ScopedTestingPlatformSupport<OriginAccessEntryTestPlatform> platform(
|
| + WTF::makeUnique<OriginAccessEntryTestPlatform>());
|
| + platform->setPublicSuffix("com");
|
|
|
| for (const auto& test : inputs) {
|
| SCOPED_TRACE(testing::Message() << "Host: " << test.host);
|
| @@ -355,8 +362,9 @@ TEST(OriginAccessEntryTest, IPAddressMatchingTest) {
|
| OriginAccessEntry::DoesNotMatchOrigin},
|
| };
|
|
|
| - OriginAccessEntryTestPlatform platform;
|
| - platform.setPublicSuffix("com");
|
| + ScopedTestingPlatformSupport<OriginAccessEntryTestPlatform> platform(
|
| + WTF::makeUnique<OriginAccessEntryTestPlatform>());
|
| + platform->setPublicSuffix("com");
|
|
|
| for (const auto& test : inputs) {
|
| SCOPED_TRACE(testing::Message() << "Host: " << test.host
|
|
|