| Index: net/base/registry_controlled_domains/registry_controlled_domain_unittest.cc
|
| diff --git a/net/base/registry_controlled_domains/registry_controlled_domain_unittest.cc b/net/base/registry_controlled_domains/registry_controlled_domain_unittest.cc
|
| index 42af173b584a122bd7bb383b06be705920338bc7..0d553cb255b3b8f79a4a1c95dd2fad807323a986 100644
|
| --- a/net/base/registry_controlled_domains/registry_controlled_domain_unittest.cc
|
| +++ b/net/base/registry_controlled_domains/registry_controlled_domain_unittest.cc
|
| @@ -5,6 +5,7 @@
|
| #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| #include "url/gurl.h"
|
| +#include "url/origin.h"
|
|
|
| namespace {
|
| namespace test1 {
|
| @@ -67,12 +68,6 @@ size_t GetRegistryLengthFromHostIncludingPrivate(
|
| return GetRegistryLength(host, unknown_filter, INCLUDE_PRIVATE_REGISTRIES);
|
| }
|
|
|
| -bool CompareDomains(const std::string& url1, const std::string& url2) {
|
| - GURL g1 = GURL(url1);
|
| - GURL g2 = GURL(url2);
|
| - return SameDomainOrHost(g1, g2, EXCLUDE_PRIVATE_REGISTRIES);
|
| -}
|
| -
|
| } // namespace
|
|
|
| class RegistryControlledDomainTest : public testing::Test {
|
| @@ -82,6 +77,17 @@ class RegistryControlledDomainTest : public testing::Test {
|
| SetFindDomainGraph(graph, sizeof(Graph));
|
| }
|
|
|
| + bool CompareDomains(const std::string& url1, const std::string& url2) {
|
| + SCOPED_TRACE(url1 + " " + url2);
|
| + GURL g1 = GURL(url1);
|
| + GURL g2 = GURL(url2);
|
| + url::Origin o1 = url::Origin(g1);
|
| + url::Origin o2 = url::Origin(g2);
|
| + EXPECT_EQ(SameDomainOrHost(o1, o2, EXCLUDE_PRIVATE_REGISTRIES),
|
| + SameDomainOrHost(g1, g2, EXCLUDE_PRIVATE_REGISTRIES));
|
| + return SameDomainOrHost(g1, g2, EXCLUDE_PRIVATE_REGISTRIES);
|
| + }
|
| +
|
| void TearDown() override { SetFindDomainGraph(); }
|
| };
|
|
|
|
|