| OLD | NEW |
| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
| 7 #include "chrome/browser/password_manager/chrome_password_manager_client.h" | 7 #include "chrome/browser/password_manager/chrome_password_manager_client.h" |
| 8 #include "chrome/browser/password_manager/password_manager_test_base.h" | 8 #include "chrome/browser/password_manager/password_manager_test_base.h" |
| 9 #include "chrome/browser/password_manager/password_store_factory.h" | 9 #include "chrome/browser/password_manager/password_store_factory.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 NavigateToFile("/password/signup_form.html"); | 78 NavigateToFile("/password/signup_form.html"); |
| 79 } | 79 } |
| 80 | 80 |
| 81 void TearDownOnMainThread() override { | 81 void TearDownOnMainThread() override { |
| 82 PasswordManagerBrowserTestBase::TearDownOnMainThread(); | 82 PasswordManagerBrowserTestBase::TearDownOnMainThread(); |
| 83 | 83 |
| 84 // Clean up UI. | 84 // Clean up UI. |
| 85 ChromePasswordManagerClient* client = | 85 ChromePasswordManagerClient* client = |
| 86 ChromePasswordManagerClient::FromWebContents(WebContents()); | 86 ChromePasswordManagerClient::FromWebContents(WebContents()); |
| 87 client->HidePasswordGenerationPopup(); | 87 client->HidePasswordGenerationPopup(); |
| 88 |
| 89 autofill::test::ReenableSystemServices(); |
| 88 } | 90 } |
| 89 | 91 |
| 90 std::string GetFieldValue(const std::string& field_id) { | 92 std::string GetFieldValue(const std::string& field_id) { |
| 91 std::string value; | 93 std::string value; |
| 92 EXPECT_TRUE(content::ExecuteScriptAndExtractString( | 94 EXPECT_TRUE(content::ExecuteScriptAndExtractString( |
| 93 RenderViewHost(), | 95 RenderViewHost(), |
| 94 "window.domAutomationController.send(" | 96 "window.domAutomationController.send(" |
| 95 " document.getElementById('" + field_id + "').value);", | 97 " document.getElementById('" + field_id + "').value);", |
| 96 &value)); | 98 &value)); |
| 97 return value; | 99 return value; |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 EXPECT_FALSE(password_store->IsEmpty()); | 220 EXPECT_FALSE(password_store->IsEmpty()); |
| 219 | 221 |
| 220 // Make sure the username is correct. | 222 // Make sure the username is correct. |
| 221 password_manager::TestPasswordStore::PasswordMap stored_passwords = | 223 password_manager::TestPasswordStore::PasswordMap stored_passwords = |
| 222 password_store->stored_passwords(); | 224 password_store->stored_passwords(); |
| 223 EXPECT_EQ(1u, stored_passwords.size()); | 225 EXPECT_EQ(1u, stored_passwords.size()); |
| 224 EXPECT_EQ(1u, stored_passwords.begin()->second.size()); | 226 EXPECT_EQ(1u, stored_passwords.begin()->second.size()); |
| 225 EXPECT_EQ(base::UTF8ToUTF16("something"), | 227 EXPECT_EQ(base::UTF8ToUTF16("something"), |
| 226 (stored_passwords.begin()->second)[0].username_value); | 228 (stored_passwords.begin()->second)[0].username_value); |
| 227 } | 229 } |
| OLD | NEW |