Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/password_manager/password_manager_metrics_util.h" | |
| 6 | |
| 7 #include "testing/gtest/include/gtest/gtest.h" | |
| 8 | |
| 9 TEST(PasswordManagerTest, IsDomainNameMonitoredTest) { | |
| 10 std::string domain_name; | |
| 11 | |
| 12 domain_name = password_manager_metrics_util::IsDomainNameMonitored( | |
| 13 "https://www.linkedin.com"); | |
| 14 EXPECT_FALSE(domain_name.empty()); | |
| 15 domain_name = password_manager_metrics_util::IsDomainNameMonitored( | |
| 16 "https://www.amazon.com"); | |
| 17 EXPECT_FALSE(domain_name.empty()); | |
| 18 domain_name = password_manager_metrics_util::IsDomainNameMonitored( | |
| 19 "https://www.facebook.com"); | |
| 20 EXPECT_EQ("", domain_name); | |
|
vabr (Chromium)
2013/09/10 08:46:53
nit:
EXPECT_TRUE(domain_name.empty())
that would
jdomingos
2013/09/10 16:49:13
Done.
| |
| 21 domain_name = password_manager_metrics_util::IsDomainNameMonitored( | |
| 22 "http://wikipedia.org"); | |
| 23 EXPECT_FALSE(domain_name.empty()); | |
| 24 domain_name = password_manager_metrics_util::IsDomainNameMonitored( | |
| 25 "http://thisisnotwikipedia.org"); | |
| 26 EXPECT_EQ("", domain_name); | |
| 27 } | |
| OLD | NEW |