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

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

Issue 2165473002: MD History: Close the item overflow menu when search results change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_slash_command
Patch Set: Close unconditionally 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/resources/md_history/list_container.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_overflow_menu_test.js
diff --git a/chrome/test/data/webui/md_history/history_overflow_menu_test.js b/chrome/test/data/webui/md_history/history_overflow_menu_test.js
index 14a2e76206f0c821a027f97880e56016a67f03c3..9ec62aa8fd400eec30b9d1b6aebfd66b58256185 100644
--- a/chrome/test/data/webui/md_history/history_overflow_menu_test.js
+++ b/chrome/test/data/webui/md_history/history_overflow_menu_test.js
@@ -18,11 +18,13 @@ cr.define('md_history.history_overflow_menu_test', function() {
function registerTests() {
suite('#overflow-menu', function() {
+ var app;
var listContainer;
var sharedMenu;
suiteSetup(function() {
- listContainer = $('history-app').$['history'];
+ app = $('history-app');
+ listContainer = app.$['history'];
sharedMenu = listContainer.$.sharedMenu;
var element1 = document.createElement('div');
@@ -60,6 +62,18 @@ cr.define('md_history.history_overflow_menu_test', function() {
assertEquals(MENU_EVENT.detail.target, sharedMenu.lastAnchor_);
});
+ test('menu closes when search changes', function() {
+ var entry =
+ [createHistoryEntry('2016-07-19', 'https://www.nianticlabs.com')];
+
+ app.historyResult(createHistoryInfo(), entry);
+ listContainer.toggleMenu_(MENU_EVENT);
+
+ // Menu closes when search changes
+ app.historyResult(createHistoryInfo('niantic'), entry);
+ assertFalse(sharedMenu.menuOpen);
+ });
+
teardown(function() {
sharedMenu.lastAnchor_ = null;
});
« no previous file with comments | « chrome/browser/resources/md_history/list_container.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698