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

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

Issue 2092763004: [MD Settings] Implement search in material design passwords. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: indexOf -> includes Created 4 years, 5 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 | « chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 dd22d9b5668c1fc372a55076f89ea9d2d5a3a8f7..d4d6f256bebd0e7ba261c4894fd1356bff89f68e 100644
--- a/chrome/test/data/webui/settings/settings_passwords_section_browsertest.js
+++ b/chrome/test/data/webui/settings/settings_passwords_section_browsertest.js
@@ -129,7 +129,7 @@ SettingsPasswordSectionBrowserTest.prototype = {
/**
* Helper method used to test for a url in a list of passwords.
* @param {!Array<!chrome.passwordsPrivate.PasswordUiEntry>} passwordList
- * @param {!string} url The URL that is being searched for.
+ * @param {string} url The URL that is being searched for.
*/
listContainsUrl(passwordList, url) {
for (var i = 0; i < passwordList.length; ++i) {
@@ -142,7 +142,7 @@ SettingsPasswordSectionBrowserTest.prototype = {
/**
* Helper method used to test for a url in a list of passwords.
* @param {!Array<!chrome.passwordsPrivate.ExceptionPair>} exceptionList
- * @param {!string} url The URL that is being searched for.
+ * @param {string} url The URL that is being searched for.
*/
exceptionsListContainsUrl(exceptionList, url) {
for (var i = 0; i < exceptionList.length; ++i) {
@@ -268,6 +268,58 @@ TEST_F('SettingsPasswordSectionBrowserTest', 'uiTests', function() {
clickRemoveButton();
});
+ test('verifyFilterPasswords', function() {
+ var passwordList = [
+ FakeDataMaker.passwordEntry('one.com', 'show', 5),
+ FakeDataMaker.passwordEntry('two.com', 'shower', 3),
+ FakeDataMaker.passwordEntry('three.com/show', 'four', 1),
+ FakeDataMaker.passwordEntry('four.com', 'three', 2),
+ FakeDataMaker.passwordEntry('five.com', 'two', 4),
+ FakeDataMaker.passwordEntry('six-show.com', 'one', 6),
+ ];
+
+ var passwordsSection = self.createPasswordsSection_(passwordList, []);
+ passwordsSection.filter = 'show';
+ Polymer.dom.flush();
+
+ var expectedPasswordList = [
+ FakeDataMaker.passwordEntry('one.com', 'show', 5),
+ FakeDataMaker.passwordEntry('two.com', 'shower', 3),
+ FakeDataMaker.passwordEntry('three.com/show', 'four', 1),
+ FakeDataMaker.passwordEntry('six-show.com', 'one', 6),
+ ];
+
+ self.validatePasswordList(
+ self.getIronListChildren_(passwordsSection.$.passwordList),
+ expectedPasswordList);
+ });
+
+ test('verifyFilterPasswordExceptions', function() {
+ var exceptionList = [
+ FakeDataMaker.exceptionEntry('docsshow.google.com'),
+ FakeDataMaker.exceptionEntry('showmail.com'),
+ FakeDataMaker.exceptionEntry('google.com'),
+ FakeDataMaker.exceptionEntry('inbox.google.com'),
+ FakeDataMaker.exceptionEntry('mapsshow.google.com'),
+ FakeDataMaker.exceptionEntry('plus.google.comshow'),
+ ];
+
+ var passwordsSection = self.createPasswordsSection_([], exceptionList);
+ passwordsSection.filter = 'show';
+ Polymer.dom.flush();
+
+ var expectedExceptionList = [
+ FakeDataMaker.exceptionEntry('docsshow.google.com'),
+ FakeDataMaker.exceptionEntry('showmail.com'),
+ FakeDataMaker.exceptionEntry('mapsshow.google.com'),
+ FakeDataMaker.exceptionEntry('plus.google.comshow'),
+ ];
+
+ self.validateExceptionList_(
+ self.getIronListChildren_(passwordsSection.$.passwordExceptionsList),
+ expectedExceptionList);
+ });
+
test('verifyPasswordExceptions', function() {
var exceptionList = [
FakeDataMaker.exceptionEntry('docs.google.com'),
« no previous file with comments | « chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698