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

Side by Side Diff: net/base/registry_controlled_domains/registry_controlled_domain_unittest.cc

Issue 663043004: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « net/base/priority_queue_unittest.cc ('k') | net/base/sdch_dictionary_fetcher_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" 5 #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 #include "url/gurl.h" 7 #include "url/gurl.h"
8 8
9 namespace { 9 namespace {
10 namespace test1 { 10 namespace test1 {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 } // namespace 76 } // namespace
77 77
78 class RegistryControlledDomainTest : public testing::Test { 78 class RegistryControlledDomainTest : public testing::Test {
79 protected: 79 protected:
80 template <typename Graph> 80 template <typename Graph>
81 void UseDomainData(const Graph& graph) { 81 void UseDomainData(const Graph& graph) {
82 SetFindDomainGraph(graph, sizeof(Graph)); 82 SetFindDomainGraph(graph, sizeof(Graph));
83 } 83 }
84 84
85 virtual void TearDown() { SetFindDomainGraph(); } 85 void TearDown() override { SetFindDomainGraph(); }
86 }; 86 };
87 87
88 TEST_F(RegistryControlledDomainTest, TestGetDomainAndRegistry) { 88 TEST_F(RegistryControlledDomainTest, TestGetDomainAndRegistry) {
89 UseDomainData(test1::kDafsa); 89 UseDomainData(test1::kDafsa);
90 90
91 // Test GURL version of GetDomainAndRegistry(). 91 // Test GURL version of GetDomainAndRegistry().
92 EXPECT_EQ("baz.jp", GetDomainFromURL("http://a.baz.jp/file.html")); // 1 92 EXPECT_EQ("baz.jp", GetDomainFromURL("http://a.baz.jp/file.html")); // 1
93 EXPECT_EQ("baz.jp.", GetDomainFromURL("http://a.baz.jp./file.html")); // 1 93 EXPECT_EQ("baz.jp.", GetDomainFromURL("http://a.baz.jp./file.html")); // 1
94 EXPECT_EQ("", GetDomainFromURL("http://ac.jp")); // 2 94 EXPECT_EQ("", GetDomainFromURL("http://ac.jp")); // 2
95 EXPECT_EQ("", GetDomainFromURL("http://a.bar.jp")); // 3 95 EXPECT_EQ("", GetDomainFromURL("http://a.bar.jp")); // 3
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 GetRegistryLengthFromHostIncludingPrivate( 491 GetRegistryLengthFromHostIncludingPrivate(
492 key4, EXCLUDE_UNKNOWN_REGISTRIES)); 492 key4, EXCLUDE_UNKNOWN_REGISTRIES));
493 EXPECT_EQ(0U, 493 EXPECT_EQ(0U,
494 GetRegistryLengthFromHostIncludingPrivate( 494 GetRegistryLengthFromHostIncludingPrivate(
495 key5, EXCLUDE_UNKNOWN_REGISTRIES)); 495 key5, EXCLUDE_UNKNOWN_REGISTRIES));
496 EXPECT_EQ(5U, GetRegistryLengthFromHost(key6, EXCLUDE_UNKNOWN_REGISTRIES)); 496 EXPECT_EQ(5U, GetRegistryLengthFromHost(key6, EXCLUDE_UNKNOWN_REGISTRIES));
497 EXPECT_EQ(5U, GetRegistryLengthFromHost(key7, EXCLUDE_UNKNOWN_REGISTRIES)); 497 EXPECT_EQ(5U, GetRegistryLengthFromHost(key7, EXCLUDE_UNKNOWN_REGISTRIES));
498 } 498 }
499 } // namespace registry_controlled_domains 499 } // namespace registry_controlled_domains
500 } // namespace net 500 } // namespace net
OLDNEW
« no previous file with comments | « net/base/priority_queue_unittest.cc ('k') | net/base/sdch_dictionary_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698