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

Side by Side Diff: components/safe_browsing/password_protection/password_protection_service_unittest.cc

Issue 2896053002: Don't send saved password domain (Closed)
Patch Set: add is_chrome_signin_password Created 3 years, 7 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
« no previous file with comments | « components/safe_browsing/password_protection/password_protection_request.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #include "components/safe_browsing/password_protection/password_protection_servi ce.h" 4 #include "components/safe_browsing/password_protection/password_protection_servi ce.h"
5 5
6 #include "base/memory/ptr_util.h" 6 #include "base/memory/ptr_util.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/test/histogram_tester.h" 10 #include "base/test/histogram_tester.h"
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 request_->OnURLFetchComplete(&fetcher); 623 request_->OnURLFetchComplete(&fetcher);
624 base::RunLoop().RunUntilIdle(); 624 base::RunLoop().RunUntilIdle();
625 625
626 LoginReputationClientRequest* actual_request = 626 LoginReputationClientRequest* actual_request =
627 password_protection_service_->GetLatestRequestProto(); 627 password_protection_service_->GetLatestRequestProto();
628 EXPECT_EQ(kTargetUrl, actual_request->page_url()); 628 EXPECT_EQ(kTargetUrl, actual_request->page_url());
629 EXPECT_EQ(LoginReputationClientRequest::PASSWORD_REUSE_EVENT, 629 EXPECT_EQ(LoginReputationClientRequest::PASSWORD_REUSE_EVENT,
630 actual_request->trigger_type()); 630 actual_request->trigger_type());
631 EXPECT_EQ(1, actual_request->frames_size()); 631 EXPECT_EQ(1, actual_request->frames_size());
632 EXPECT_EQ(kTargetUrl, actual_request->frames(0).url()); 632 EXPECT_EQ(kTargetUrl, actual_request->frames(0).url());
633 ASSERT_TRUE(actual_request->has_password_reuse_event()); 633 // TODO(jialiul): Update this test when we're ready to fill more fields.
634 ASSERT_EQ(1, actual_request->password_reuse_event() 634 ASSERT_FALSE(actual_request->has_password_reuse_event());
635 .password_reused_original_origins_size());
636 EXPECT_EQ(kSavedDomain, actual_request->password_reuse_event()
637 .password_reused_original_origins(0));
638 } 635 }
639 636
640 } // namespace safe_browsing 637 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « components/safe_browsing/password_protection/password_protection_request.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698