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

Unified Diff: chrome/test/data/webui/cr_elements/cr_action_menu_test.js

Issue 2708863004: WebUI: Close cr-action-menu on popstate event. (Closed)
Patch Set: Add test Created 3 years, 10 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 | « no previous file | ui/webui/resources/cr_elements/cr_action_menu/cr_action_menu.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/cr_elements/cr_action_menu_test.js
diff --git a/chrome/test/data/webui/cr_elements/cr_action_menu_test.js b/chrome/test/data/webui/cr_elements/cr_action_menu_test.js
index 6cfa650138258af262bf93a50f68d6d88208bec0..15dd8e0da2cc483f4da159d6918634e5d4040342 100644
--- a/chrome/test/data/webui/cr_elements/cr_action_menu_test.js
+++ b/chrome/test/data/webui/cr_elements/cr_action_menu_test.js
@@ -96,6 +96,14 @@ suite('CrActionMenu', function() {
assertFalse(menu.open);
});
+ test('close on popstate', function() {
+ menu.showAt(document.querySelector('#dots'));
+ assertTrue(menu.open);
+
+ window.dispatchEvent(new CustomEvent('popstate'));
+ assertFalse(menu.open);
+ });
+
/** @param {string} key The key to use for closing. */
function testFocusAfterClosing(key) {
return new Promise(function(resolve) {
« no previous file with comments | « no previous file | ui/webui/resources/cr_elements/cr_action_menu/cr_action_menu.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698