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

Unified Diff: third_party/WebKit/Source/platform/weborigin/OriginAccessEntryTest.cpp

Issue 2588403002: TestingPlatformSupport: register Platform instance correctly (Closed)
Patch Set: review #32 Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
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..0afb05578d036ff765c94d6567ce9f256cddbce7 100644
--- a/third_party/WebKit/Source/platform/weborigin/OriginAccessEntryTest.cpp
+++ b/third_party/WebKit/Source/platform/weborigin/OriginAccessEntryTest.cpp
@@ -68,8 +68,8 @@ class OriginAccessEntryTestPlatform : public TestingPlatformSupport {
};
TEST(OriginAccessEntryTest, PublicSuffixListTest) {
- OriginAccessEntryTestPlatform platform;
- platform.setPublicSuffix("com");
+ ScopedTestingPlatformSupport<OriginAccessEntryTestPlatform> platform;
+ platform->setPublicSuffix("com");
RefPtr<SecurityOrigin> origin =
SecurityOrigin::createFromString("http://www.google.com");
@@ -135,8 +135,8 @@ TEST(OriginAccessEntryTest, AllowSubdomainsTest) {
OriginAccessEntry::DoesNotMatchOrigin, OriginAccessEntry::MatchesOrigin},
};
- OriginAccessEntryTestPlatform platform;
- platform.setPublicSuffix("com");
+ ScopedTestingPlatformSupport<OriginAccessEntryTestPlatform> platform;
+ platform->setPublicSuffix("com");
for (const auto& test : inputs) {
SCOPED_TRACE(testing::Message() << "Host: " << test.host
@@ -189,8 +189,8 @@ TEST(OriginAccessEntryTest, AllowRegisterableDomainsTest) {
OriginAccessEntry::DoesNotMatchOrigin},
};
- OriginAccessEntryTestPlatform platform;
- platform.setPublicSuffix("com");
+ ScopedTestingPlatformSupport<OriginAccessEntryTestPlatform> platform;
+ platform->setPublicSuffix("com");
for (const auto& test : inputs) {
RefPtr<SecurityOrigin> originToTest =
@@ -245,8 +245,8 @@ TEST(OriginAccessEntryTest, AllowRegisterableDomainsTestWithDottedSuffix) {
OriginAccessEntry::DoesNotMatchOrigin},
};
- OriginAccessEntryTestPlatform platform;
- platform.setPublicSuffix("appspot.com");
+ ScopedTestingPlatformSupport<OriginAccessEntryTestPlatform> platform;
+ platform->setPublicSuffix("appspot.com");
for (const auto& test : inputs) {
RefPtr<SecurityOrigin> originToTest =
@@ -296,8 +296,8 @@ TEST(OriginAccessEntryTest, DisallowSubdomainsTest) {
OriginAccessEntry::DoesNotMatchOrigin},
};
- OriginAccessEntryTestPlatform platform;
- platform.setPublicSuffix("com");
+ ScopedTestingPlatformSupport<OriginAccessEntryTestPlatform> platform;
+ platform->setPublicSuffix("com");
for (const auto& test : inputs) {
SCOPED_TRACE(testing::Message() << "Host: " << test.host
@@ -327,8 +327,8 @@ TEST(OriginAccessEntryTest, IPAddressTest) {
{"http", "", false},
};
- OriginAccessEntryTestPlatform platform;
- platform.setPublicSuffix("com");
+ ScopedTestingPlatformSupport<OriginAccessEntryTestPlatform> platform;
+ platform->setPublicSuffix("com");
for (const auto& test : inputs) {
SCOPED_TRACE(testing::Message() << "Host: " << test.host);
@@ -355,8 +355,8 @@ TEST(OriginAccessEntryTest, IPAddressMatchingTest) {
OriginAccessEntry::DoesNotMatchOrigin},
};
- OriginAccessEntryTestPlatform platform;
- platform.setPublicSuffix("com");
+ ScopedTestingPlatformSupport<OriginAccessEntryTestPlatform> platform;
+ platform->setPublicSuffix("com");
for (const auto& test : inputs) {
SCOPED_TRACE(testing::Message() << "Host: " << test.host
« no previous file with comments | « third_party/WebKit/Source/platform/text/LocaleMacTest.cpp ('k') | third_party/WebKit/public/platform/Platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698