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

Side by Side Diff: chrome/browser/ui/passwords/manage_passwords_test.cc

Issue 1776673003: Fix the password bubble titles for android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix the tests Created 4 years, 9 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/ui/passwords/manage_passwords_test.h" 5 #include "chrome/browser/ui/passwords/manage_passwords_test.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 password_manager::StubPasswordManagerDriver driver; 74 password_manager::StubPasswordManagerDriver driver;
75 75
76 scoped_ptr<password_manager::PasswordFormManager> test_form_manager( 76 scoped_ptr<password_manager::PasswordFormManager> test_form_manager(
77 new password_manager::PasswordFormManager( 77 new password_manager::PasswordFormManager(
78 nullptr, &client, driver.AsWeakPtr(), *test_form(), false)); 78 nullptr, &client, driver.AsWeakPtr(), *test_form(), false));
79 GetController()->OnAutomaticPasswordSave(std::move(test_form_manager)); 79 GetController()->OnAutomaticPasswordSave(std::move(test_form_manager));
80 } 80 }
81 81
82 void ManagePasswordsTest::SetupAutoSignin( 82 void ManagePasswordsTest::SetupAutoSignin(
83 ScopedVector<autofill::PasswordForm> local_credentials) { 83 ScopedVector<autofill::PasswordForm> local_credentials) {
84 GetController()->OnAutoSignin(std::move(local_credentials)); 84 ASSERT_FALSE(local_credentials.empty());
85 GURL origin = local_credentials[0]->origin;
86 GetController()->OnAutoSignin(std::move(local_credentials), origin);
85 } 87 }
86 88
87 scoped_ptr<base::HistogramSamples> ManagePasswordsTest::GetSamples( 89 scoped_ptr<base::HistogramSamples> ManagePasswordsTest::GetSamples(
88 const char* histogram) { 90 const char* histogram) {
89 // Ensure that everything has been properly recorded before pulling samples. 91 // Ensure that everything has been properly recorded before pulling samples.
90 content::RunAllPendingInMessageLoop(); 92 content::RunAllPendingInMessageLoop();
91 return histogram_tester_.GetHistogramSamplesSinceCreation(histogram); 93 return histogram_tester_.GetHistogramSamplesSinceCreation(histogram);
92 } 94 }
93 95
94 PasswordsClientUIDelegate* ManagePasswordsTest::GetController() { 96 PasswordsClientUIDelegate* ManagePasswordsTest::GetController() {
95 return PasswordsClientUIDelegateFromWebContents( 97 return PasswordsClientUIDelegateFromWebContents(
96 browser()->tab_strip_model()->GetActiveWebContents()); 98 browser()->tab_strip_model()->GetActiveWebContents());
97 } 99 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698