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

Unified Diff: chrome/test/data/webui/md_history/history_toolbar_test.js

Issue 2369823002: MD History: Focus the search field on load without 'showing' it (Closed)
Patch Set: Closure Created 4 years, 3 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/resources/md_history/app.crisper.js ('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/md_history/history_toolbar_test.js
diff --git a/chrome/test/data/webui/md_history/history_toolbar_test.js b/chrome/test/data/webui/md_history/history_toolbar_test.js
index b16793c473b3c339c672eaad494969ba78c3f845..bbac0e3370d6a1a2eba20c362973d3ea49a14d06 100644
--- a/chrome/test/data/webui/md_history/history_toolbar_test.js
+++ b/chrome/test/data/webui/md_history/history_toolbar_test.js
@@ -116,6 +116,7 @@ cr.define('md_history.history_toolbar_focus_test', function() {
;
setup(function() {
+ window.resultsRendered = false;
app = replaceApp();
element = app.$['history'].$['infinite-list'];
@@ -123,8 +124,7 @@ cr.define('md_history.history_toolbar_focus_test', function() {
});
test('search bar is focused on load in wide mode', function() {
- window.resultsRendered = false;
- app.hasDrawer_ = false;
+ toolbar.$['main-toolbar'].narrow_ = false;
historyResult(createHistoryInfo(), []);
return flush().then(() => {
@@ -137,15 +137,17 @@ cr.define('md_history.history_toolbar_focus_test', function() {
});
test('search bar is not focused on load in narrow mode', function() {
- app.hasDrawer_ = true;
+ toolbar.$['main-toolbar'].narrow_ = true;
historyResult(createHistoryInfo(), []);
- // Ensure the search bar is focused on load.
- assertFalse(
- $('history-app')
- .$.toolbar.$['main-toolbar']
- .getSearchField()
- .isSearchFocused());
+ return flush().then(() => {
+ // Ensure the search bar is focused on load.
+ assertFalse(
+ $('history-app')
+ .$.toolbar.$['main-toolbar']
+ .getSearchField()
+ .isSearchFocused());
+ });
});
});
};
« no previous file with comments | « chrome/browser/resources/md_history/app.crisper.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698