| 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;
|
| });
|
|
|