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

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: 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
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..443127b51724be0bd141abc0384e01e7e56ce3a8 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 {
+std::string kTestOrigin = "https://www.example.com";
tapted 2017/05/10 05:30:10 these will make static initializers (basically eve
Patti Lor 2017/05/11 06:59:17 Ooh, I didn't know that, thanks! Fixed.
+base::string16 kTestUsername = base::ASCIIToUTF16("test_username");
+base::string16 kTestPassword = base::ASCIIToUTF16("test_password");
+}
tapted 2017/05/10 05:30:11 // namespace
Patti Lor 2017/05/11 06:59:17 Done.
+
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 = kTestUsername;
+ test_form_.password_value = 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,7 +60,6 @@ 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()));
GetController()->OnPasswordAutofilled(map, map.begin()->second->origin,

Powered by Google App Engine
This is Rietveld 408576698