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

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

Issue 2634493005: MD Settings: Site exceptions, close action menu when list changes. (Closed)
Patch Set: Adding test. Created 3 years, 11 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/settings/site_settings/site_list.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/settings/site_list_tests.js
diff --git a/chrome/test/data/webui/settings/site_list_tests.js b/chrome/test/data/webui/settings/site_list_tests.js
index a8e60e97b0b0b15fc126d2daa2c166e23ea6bbee..95bb6b6afa7318bb3c6eafa5c96245488ab473b2 100644
--- a/chrome/test/data/webui/settings/site_list_tests.js
+++ b/chrome/test/data/webui/settings/site_list_tests.js
@@ -462,6 +462,28 @@ cr.define('site_list', function() {
});
});
+ test('action menu closes when list changes', function() {
+ setUpCategory(settings.ContentSettingsTypes.GEOLOCATION,
+ settings.PermissionValues.ALLOW, prefs);
+ var actionMenu = testElement.$$('dialog[is=cr-action-menu]');
+ return browserProxy.whenCalled('getExceptionList').then(
+ function(contentType) {
+ Polymer.dom.flush(); // Populates action menu.
+ openActionMenu(0);
+ assertTrue(actionMenu.open);
+
+ browserProxy.resetResolver('getExceptionList');
+ // Simulate a change in the underlying model.
+ cr.webUIListenerCallback(
+ 'contentSettingSitePermissionChanged',
+ settings.ContentSettingsTypes.GEOLOCATION);
+ return browserProxy.whenCalled('getExceptionList');
+ }).then(function() {
+ // Check that the action menu was closed.
+ assertFalse(actionMenu.open);
+ });
+ });
+
test('exceptions are not reordered in non-ALL_SITES', function() {
setUpCategory(settings.ContentSettingsTypes.GEOLOCATION,
settings.PermissionValues.BLOCK, prefsMixedProvider);
« no previous file with comments | « chrome/browser/resources/settings/site_settings/site_list.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698