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

Unified Diff: chrome/test/data/webui/settings/settings_passwords_section_browsertest.js

Issue 1591053002: Add a password handler to get the list of passwords in md-settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback Created 4 years, 11 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/test/data/webui/settings/settings_passwords_section_browsertest.js
diff --git a/chrome/test/data/webui/settings/settings_passwords_section_browsertest.js b/chrome/test/data/webui/settings/settings_passwords_section_browsertest.js
index c6467b22fbc5e9f5721db8d886803ffce7f848a1..17a80c23671acbfd98c8e5129a4643cf22e06e25 100644
--- a/chrome/test/data/webui/settings/settings_passwords_section_browsertest.js
+++ b/chrome/test/data/webui/settings/settings_passwords_section_browsertest.js
@@ -39,13 +39,13 @@ TEST_F('SettingsPasswordSectionBrowserTest', 'uiTests', function() {
assertEquals(self.browsePreload, document.location.href,
'Unexpected URL loaded');
- var passwordList = [{origin: 'anotherwebsite.com',
+ var passwordList = [{shownUrl: 'anotherwebsite.com',
username: 'luigi',
password: '*******'},
- {origin: 'longwebsite.com',
+ {shownUrl: 'longwebsite.com',
username: 'peach',
password: '***'},
- {origin: 'website.com',
+ {shownUrl: 'website.com',
username: 'mario',
password: '*******'}];
@@ -62,20 +62,20 @@ TEST_F('SettingsPasswordSectionBrowserTest', 'uiTests', function() {
'Failed to pass list of passwords to iron-list');
var list = Polymer.dom(passwordsSection.$.passwordList);
- assertTrue(!!list, "Failed to get the password list");
+ assertTrue(!!list, 'Failed to get the password list');
// Skip the first child because it's the template.
var listChildren = list.children.slice(1);
var validate = function(nodes, passwordList, index) {
dpapad 2016/01/20 17:56:07 Nit: Can you add some type annotation to this func
hcarmona 2016/01/20 23:13:53 Done.
assertTrue(!!nodes[index], 'Failed to get nodes[' + index + ']');
dpapad 2016/01/20 17:56:07 Nit (optional): How about var node = nodes[index]
hcarmona 2016/01/20 23:13:53 Done.
- assertEquals(passwordList[index].origin,
- nodes[index].querySelector('#origin').textContent,
- 'origin mismatch in nodes[' + index + ']');
+ assertEquals(passwordList[index].shownUrl,
+ nodes[index].querySelector('#shownUrl').textContent,
+ 'shownUrl mismatch in nodes[' + index + ']');
assertEquals(passwordList[index].username,
nodes[index].querySelector('#username').textContent,
'username mismatch in nodes[' + index + ']');
assertEquals(passwordList[index].password,
- nodes[index].querySelector('#password').textContent,
+ nodes[index].querySelector('#password').value,
'password mismatch in nodes[' + index + ']');
};

Powered by Google App Engine
This is Rietveld 408576698