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

Unified Diff: chrome/browser/ui/passwords/manage_passwords_test.cc

Issue 2869683003: Views/Harmony: Remove references to layout constants in c/b/u/v/passwords. (Closed)
Patch Set: Review comments. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/views/passwords/account_chooser_dialog_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/passwords/manage_passwords_test.cc
diff --git a/chrome/browser/ui/passwords/manage_passwords_test.cc b/chrome/browser/ui/passwords/manage_passwords_test.cc
index 744d738a616e46c0d12525d2d3b8c66beb51751f..6e3ff50bd4e3ad0c3aa013345a1d667603de341b 100644
--- a/chrome/browser/ui/passwords/manage_passwords_test.cc
+++ b/chrome/browser/ui/passwords/manage_passwords_test.cc
@@ -24,15 +24,27 @@
#include "components/password_manager/core/browser/password_manager_metrics_util.h"
#include "components/password_manager/core/browser/stub_form_saver.h"
+namespace {
+constexpr char kTestOrigin[] = "https://www.example.com";
+constexpr char kTestUsername[] = "test_username";
+constexpr char kTestPassword[] = "test_password";
+} // namespace
+
ManagePasswordsTest::ManagePasswordsTest() {
fetcher_.Fetch();
+
+ // Populate |test_form_| with some dummy data.
+ test_form_.signon_realm = kTestOrigin;
+ test_form_.origin = GURL(kTestOrigin);
+ test_form_.username_value = base::ASCIIToUTF16(kTestUsername);
+ test_form_.password_value = base::ASCIIToUTF16(kTestPassword);
}
ManagePasswordsTest::~ManagePasswordsTest() {
}
void ManagePasswordsTest::SetUpOnMainThread() {
- AddTabAtIndex(0, GURL("http://example.com/"), ui::PAGE_TRANSITION_TYPED);
+ AddTabAtIndex(0, GURL(kTestOrigin), ui::PAGE_TRANSITION_TYPED);
}
void ManagePasswordsTest::ExecuteManagePasswordsCommand() {
@@ -48,9 +60,8 @@ void ManagePasswordsTest::ExecuteManagePasswordsCommand() {
}
void ManagePasswordsTest::SetupManagingPasswords() {
- base::string16 kTestUsername = base::ASCIIToUTF16("test_username");
std::map<base::string16, const autofill::PasswordForm*> map;
- map.insert(std::make_pair(kTestUsername, test_form()));
+ map.insert(std::make_pair(base::ASCIIToUTF16(kTestUsername), test_form()));
GetController()->OnPasswordAutofilled(map, map.begin()->second->origin,
nullptr);
}
« no previous file with comments | « no previous file | chrome/browser/ui/views/passwords/account_chooser_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698