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

Side by Side Diff: chrome/browser/password_manager/password_manager_metrics_util_unittest.cc

Issue 23140005: Added of new UMA signals in order to be able to discover early if the "save password" feature gets … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review 5 Created 7 years, 3 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
Ilya Sherman 2013/08/30 22:34:42 nit: 2013. Also, please omit the "(c)".
jdomingos 2013/09/02 09:58:45 Done.
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"
Ilya Sherman 2013/08/30 22:34:42 nit: Please include a blank line after this one.
jdomingos 2013/09/02 09:58:45 Done.
6 #include "testing/gmock/include/gmock/gmock.h"
Ilya Sherman 2013/08/30 22:34:42 nit: This is not needed.
jdomingos 2013/09/02 09:58:45 Done.
7 #include "testing/gtest/include/gtest/gtest.h"
8
9 TEST_F(PasswordManagerTest, IsDomainNameMonitoredTest) {
Ilya Sherman 2013/08/30 22:34:42 nit: TEST, not TEST_F.
jdomingos 2013/09/02 09:58:45 Done.
10 std::string domain_name;
11
12 EXPECT_TRUE(password_manager_util::IsDomainNameMonitored(
13 "https://www.linkedin.com", &domain_name));
14 EXPECT_EQ(domain_name == "linkedin.com");
15 EXPECT_TRUE(password_manager_util::IsDomainNameMonitored(
16 "https://www.amazon.com", &domain_name));
17 EXPECT_EQ(domain_name == "amazon.com");
18 EXPECT_FALSE(password_manager_util::IsDomainNameMonitored(
19 "https://www.facebook.com", &domain_name));
20 EXPECT_EQ(domain_name == "");
21 EXPECT_TRUE(password_manager_util::IsDomainNameMonitored(
22 "wikipedia.org", &domain_name));
23 EXPECT_EQ(domain_name == "wikipedia.org");
24 EXPECT_FALSE(password_manager_util::IsDomainNameMonitored(
25 "thisisnotwikipedia.org", &domain_name));
26 EXPECT_EQ(domain_name == "");
Ilya Sherman 2013/08/30 22:34:42 Please update this test code so that it compiles w
jdomingos 2013/08/30 22:57:17 Hi Ilya, What should I change in order to make it
Ilya Sherman 2013/08/30 23:00:47 IsDomainNameMonitored() no longer returns a boolea
jdomingos 2013/08/30 23:04:54 Indeed it is obvious that it doesn't work now. Th
27 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698