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

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

Issue 2446413002: MD Settings: Ignore whitespace only search queries. (Closed)
Patch Set: Add test. Created 4 years, 2 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_ui_browsertest.js
diff --git a/chrome/test/data/webui/settings/settings_ui_browsertest.js b/chrome/test/data/webui/settings/settings_ui_browsertest.js
index 23670621c3010791ec7ed086e662f2162866ee40..980a028e97f9cbb796ecaf4b51b99418c79cbb45 100644
--- a/chrome/test/data/webui/settings/settings_ui_browsertest.js
+++ b/chrome/test/data/webui/settings/settings_ui_browsertest.js
@@ -125,6 +125,16 @@ TEST_F('SettingsUIBrowserTest', 'MAYBE_All', function() {
settings.navigateTo(settings.Route.BASIC);
assertEquals('', searchField.getSearchInput().bindValue);
});
+
+ test('whitespace only search query is ignored', function() {
+ toolbar = /** @type {!CrToolbarElement} */ (ui.$$('cr-toolbar'));
+ var searchField = /** @type {CrToolbarSearchFieldElement} */ (
+ toolbar.getSearchField());
+ searchField.setValue(' ');
+
+ var urlParams = settings.getQueryParameters();
+ assertFalse(urlParams.has('search'));
+ });
});
mocha.run();

Powered by Google App Engine
This is Rietveld 408576698