| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/tools/tld_cleanup/tld_cleanup_util.h" | 5 #include "net/tools/tld_cleanup/tld_cleanup_util.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/path_service.h" | |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 9 |
| 11 namespace net { | 10 namespace net { |
| 12 namespace tld_cleanup { | 11 namespace tld_cleanup { |
| 13 | 12 |
| 14 std::string SetupData(std::string icann_domains, std::string private_domains) { | 13 std::string SetupData(std::string icann_domains, std::string private_domains) { |
| 15 return "// ===BEGIN ICANN DOMAINS===\n" + | 14 return "// ===BEGIN ICANN DOMAINS===\n" + |
| 16 icann_domains + | 15 icann_domains + |
| 17 "// ===END ICANN DOMAINS===\n" + | 16 "// ===END ICANN DOMAINS===\n" + |
| 18 "// ===BEGIN PRIVATE DOMAINS===\n" + | 17 "// ===BEGIN PRIVATE DOMAINS===\n" + |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 EXPECT_FALSE(bar_iter->second.is_private); | 158 EXPECT_FALSE(bar_iter->second.is_private); |
| 160 RuleMap::const_iterator baz_bar_iter = rules.find("baz.bar"); | 159 RuleMap::const_iterator baz_bar_iter = rules.find("baz.bar"); |
| 161 ASSERT_FALSE(rules.end() == baz_bar_iter); | 160 ASSERT_FALSE(rules.end() == baz_bar_iter); |
| 162 EXPECT_FALSE(baz_bar_iter->second.wildcard); | 161 EXPECT_FALSE(baz_bar_iter->second.wildcard); |
| 163 EXPECT_TRUE(baz_bar_iter->second.exception); | 162 EXPECT_TRUE(baz_bar_iter->second.exception); |
| 164 EXPECT_TRUE(baz_bar_iter->second.is_private); | 163 EXPECT_TRUE(baz_bar_iter->second.is_private); |
| 165 } | 164 } |
| 166 | 165 |
| 167 } // namespace tld_cleanup | 166 } // namespace tld_cleanup |
| 168 } // namespace net | 167 } // namespace net |
| OLD | NEW |